https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/pygments/lexers/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/pygments/lexers/__pycache__/templates.cpython-310.pyc
o

���a��@s8dZddlZddlmZmZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZmZdd
lmZddlmZmZmZmZmZmZmZmZmZddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+dd
l,m-Z-m.Z.gd�Z/Gdd�de�Z0Gdd�de�Z1Gdd�de�Z2Gdd�de�Z3Gdd�de�Z4Gdd�de�Z5Gdd�de�Z6Gdd�de�Z7Gdd �d e�Z8Gd!d"�d"e�Z9Gd#d$�d$e�Z:Gd%d&�d&e�Z;Gd'd(�d(e�Z<Gd)d*�d*e�Z=Gd+d,�d,e�Z>Gd-d.�d.e�Z?Gd/d0�d0e�Z@Gd1d2�d2e�ZAGd3d4�d4e�ZBGd5d6�d6e�ZCGd7d8�d8e�ZDGd9d:�d:e�ZEGd;d<�d<e�ZFGd=d>�d>e�ZGGd?d@�d@e�ZHGdAdB�dBe�ZIGdCdD�dDe�ZJGdEdF�dFe�ZKGdGdH�dHe�ZLGdIdJ�dJe�ZMGdKdL�dLe�ZNGdMdN�dNe�ZOGdOdP�dPe�ZPGdQdR�dRe�ZQGdSdT�dTe�ZRGdUdV�dVe�ZSGdWdX�dXe�ZTGdYdZ�dZe�ZUGd[d\�d\e�ZVGd]d^�d^e�ZWGd_d`�d`e�ZXGdadb�dbe�ZYGdcdd�dde�ZZGdedf�dfe�Z[Gdgdh�dhe�Z\Gdidj�dje�Z]Gdkdl�dle�Z^Gdmdn�dne�Z_Gdodp�dpe�Z`Gdqdr�dre�ZaGdsdt�dte�ZbGdudv�dve�ZcGdwdx�dxe�ZdGdydz�dze�ZeGd{d|�d|e�ZfGd}d~�d~e�ZgGdd��d�e�ZhGd�d��d�e�ZiGd�d��d�e�ZjGd�d��d�e�ZkGd�d��d�e�ZlGd�d��d�e�ZmGd�d��d�e�ZnGd�d��d�e�ZoGd�d��d�e�ZpGd�d��d�e�ZqGd�d��d�e�ZrGd�d��d�e�ZsdS)�z�
    pygments.lexers.templates
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for various template engines' markup.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�	HtmlLexer�XmlLexer)�JavascriptLexer�
LassoLexer)�CssLexer)�PhpLexer)�PythonLexer)�	PerlLexer)�	JavaLexer�TeaLangLexer)�	YamlLexer)	�Lexer�DelegatingLexer�
RegexLexer�bygroups�include�using�this�default�combined)�Error�Punctuation�
Whitespace�Text�Comment�Operator�Keyword�Name�String�Number�Other�Token)�html_doctype_matches�looks_like_xml)?�HtmlPhpLexer�XmlPhpLexer�CssPhpLexer�JavascriptPhpLexer�ErbLexer�
RhtmlLexer�XmlErbLexer�CssErbLexer�JavascriptErbLexer�SmartyLexer�HtmlSmartyLexer�XmlSmartyLexer�CssSmartyLexer�JavascriptSmartyLexer�DjangoLexer�HtmlDjangoLexer�CssDjangoLexer�XmlDjangoLexer�JavascriptDjangoLexer�GenshiLexer�HtmlGenshiLexer�GenshiTextLexer�CssGenshiLexer�JavascriptGenshiLexer�MyghtyLexer�MyghtyHtmlLexer�MyghtyXmlLexer�MyghtyCssLexer�MyghtyJavascriptLexer�
MasonLexer�	MakoLexer�
MakoHtmlLexer�MakoXmlLexer�MakoJavascriptLexer�MakoCssLexer�JspLexer�CheetahLexer�CheetahHtmlLexer�CheetahXmlLexer�CheetahJavascriptLexer�EvoqueLexer�EvoqueHtmlLexer�EvoqueXmlLexer�ColdfusionLexer�ColdfusionHtmlLexer�ColdfusionCFCLexer�
VelocityLexer�VelocityHtmlLexer�VelocityXmlLexer�SspLexer�TeaTemplateLexer�LassoHtmlLexer�
LassoXmlLexer�
LassoCssLexer�LassoJavascriptLexer�HandlebarsLexer�HandlebarsHtmlLexer�YamlJinjaLexer�LiquidLexer�	TwigLexer�
TwigHtmlLexer�
Angular2Lexer�Angular2HtmlLexerc@sFeZdZdZdZdgZdgZe�dej	�Z
dd�Zdd	�Zd
d�Z
dS)
r(a
    Generic `ERB <http://ruby-doc.org/core/classes/ERB.html>`_ (Ruby Templating)
    lexer.

    Just highlights ruby code between the preprocessor directives, other data
    is left untouched by the lexer.

    All options are also forwarded to the `RubyLexer`.
    �ERB�erbzapplication/x-ruby-templatingz*(<%%|%%>|<%=|<%#|<%-|<%|-%>|%>|^%[^%].*?$)cKs2ddlm}|di|��|_tj|fi|��dS)Nr)�	RubyLexer�)�pygments.lexers.rubyre�
ruby_lexerr
�__init__)�self�optionsrerfrf�;/usr/lib/python3/dist-packages/pygments/lexers/templates.pyriBszErbLexer.__init__ccs�|j�|�}|��d}}z�	|dkr(|��}|t|fV|t|�7}d}n�|dkr�|��}|dvrA|t|fV|d7}d}n�|dkrc|tj|fV|��}|dt|fV|dt|�7}d}n�|dvr�|tj|fV|t|�7}|��}d}|j�	|�D]
\}}	}
|||	|
fVq�|t|�7}d}nc|d	vr�|t
|fV|t|�7}d}nP|tj|dfVd}|j�	|dd
��D]\}}	}
|d||	|
fVq�|t|�7}d}n"|dkr�|��}|d	vr�|t|fVn|tj|fV|t|�7}d}qt�yYd
Sw)z�
        Since ERB doesn't allow "<%" and other tags inside of ruby
        blocks we have to use a split approach here that fails for
        that too.
        rT�)z<%%z%%>�z<%#�)�<%z<%=z<%-)�%>z-%>N)�	_block_re�split�reverse�popr �lenr�Preprocrh�get_tokens_unprocessedr�
IndexError)rj�text�tokens�state�idx�val�tag�data�r_idx�r_token�r_valuerfrfrlrxGsn�
���7�zErbLexer.get_tokens_unprocessedcCsd|vr
d|vrdSdSdS)Nrprq皙�����?rf�rzrfrfrl�analyse_text�s�zErbLexer.analyse_textN)�__name__�
__module__�__qualname__�__doc__�name�aliases�	mimetypes�re�compile�Mrrrirxr�rfrfrfrlr(1s
Dr(c
@s�eZdZdZdZdgZdgZdgZej	ej
BZdefde
ejeej�fde
ejeed	d
�ej�fde
ejeje�dfdejdfgd
efdejdfdejdfdejfdejfdefdejfdefdejfdejfdejfgd�Zdd�ZdS)r-z�
    Generic `Smarty <http://smarty.php.net/>`_ template lexer.

    Just highlights smarty code between the preprocessor directives, other
    data is left untouched by the lexer.
    �Smarty�smarty�*.tplzapplication/x-smarty�[^{]+z(\{)(\*.*?\*)(\})z(\{php\})(.*?)(\{/php\})T)�startinlinez(\{)(/?[a-zA-Z_]\w*)(\s*)�\{�\s+�#push�\}�#popz#[a-zA-Z_]\w*#z\$[a-zA-Z_]\w*(\.\w+)*z[~!%^&*()+=|\[\]:;,.<>/?@-]�(true|false|null)\b�>[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?�"(\\\\|\\[^\\]|[^"\\])*"�'(\\\\|\\[^\\]|[^'\\])*'�[a-zA-Z_]\w*)�rootr�cCsXd}t�d|�r|d7}t�d|�r|d7}t�d|�r |d7}t�d|�r*|d7}|S)N�z\{if\s+.*?\}.*?\{/if\}�333333�?z\{include\s+file=.*?\}z \{foreach\s+.*?\}.*?\{/foreach\}z	\{\$.*?\}�{�G�z�?�r��search�rz�rvrfrfrlr��szSmartyLexer.analyse_textN) r�r�r�r�r�r��	filenamesr�r��	MULTILINE�DOTALL�flagsr rrrwrrr�Functionr�Variablerr�Constantrr�Double�Single�	Attributer{r�rfrfrfrlr-�sJ����
�

���r-c@s�eZdZdZdZdgZddgZejej	BZ
dZdefde
ejeej�fd	e
eje�fd
ede
ejejeje�dfd
ed
e
ejejej�fdedfgeejfdedfdede
eej�dfdedfed�gdefdedfdedejfed�gdefed�dedfgdedfdefdefdejfd ejfd!efd"efd#ejfdedfd$edfd%edfdedfdedfdedfgd&�Zd'd(�Zd)S)*rRz�
    Generic `Velocity <http://velocity.apache.org/>`_ template lexer.

    Just highlights velocity directives and variable references, other
    data is left untouched by the lexer.
    �Velocity�velocity�*.vm�*.fhtmlr�z[^{#$]+z(#)(\*.*?\*)(#)z
(##)(.*?$)z(#\{?)(z
)(\}?)(\s?\()�directiveparamsz)(\}|\b)z\$!?\{?�variablez\(�
funcparamsz(\.)(�)r�r�r�z=(&&|\|\||==?|!=?|[-<>+*%&|^/])|\b(eq|ne|gt|lt|ge|le|not|in)\bz\[�
rangeoperatorz\bz\.\.z\]r�z[,:]r�r�z0[xX][0-9a-fA-F]+[Ll]?z
\b[0-9]+\br��\)r�)r�r�r�r�r�cCsdd}t�d|tj�r|d7}t�d|tj�r|d7}t�d|tj�r&|d7}t�d|�r0|d7}|S)	Nr�z #\{?macro\}?\(.*?\).*?#\{?end\}?g�?z#\{?if\}?\(.+?\).*?#\{?end\}?r�z"#\{?foreach\}?\(.+?\).*?#\{?end\}?z6\$!?\{?[a-zA-Z_]\w*(\([^)]*\))?(\.\w+(\([^)]*\))?)*\}?r��r�r�r�r�rfrfrlr�s�zVelocityLexer.analyse_textN) r�r�r�r�r�r�r�r�r�r�r��
identifierr rrrwrr�rr�rrrrrr�r�rrr�r{r�rfrfrfrlrR�sv�
�
�
��
��	�����4rRc�8eZdZdZdZdgZddgZdgZ�fdd�Z�Z	S)	rSza
    Subclass of the `VelocityLexer` that highlights unlexed data
    with the `HtmlLexer`.

    z
HTML+Velocityz
html+velocity�*.htmlr�ztext/html+velocityc�t�jttfi|��dS�N)�superrirrR�rjrk��	__class__rfrlri&�zVelocityHtmlLexer.__init__)
r�r�r�r�r�r��alias_filenamesr�ri�
__classcell__rfrfr�rlrSsrSc�@eZdZdZdZdgZddgZdgZ�fdd�Zd	d
�Z	�Z
S)rTz`
    Subclass of the `VelocityLexer` that highlights unlexed data
    with the `XmlLexer`.

    zXML+Velocityzxml+velocity�*.xmlr�zapplication/xml+velocitycr�r�)r�rirrRr�r�rfrlri6r�zVelocityXmlLexer.__init__cC�"t�|�d}t|�r|d7}|S�Nr�r�)rRr�r#r�rfrfrlr�9�zVelocityXmlLexer.analyse_text�r�r�r�r�r�r�r�r�rir�r�rfrfr�rlrT*srTc@s|eZdZdZdZddgZddgZejej	BZ
defdej
d	fd
efdeej
eeeej
eej
eeeej
�fdeej
eeeej
eej
eeeej
�fd
eej
eeeej�dfdeej
ee�dfdefgdeeeej�fdeeeeeej�fdejfdefdejfdejfdejfdejfdejfdefdefgdefdeeej
�dfed�gdefd eeej
�dfed�d!efgd"�Zd#d$�Zd%S)&r2a
    Generic `django <http://www.djangoproject.com/documentation/templates/>`_
    and `jinja <https://jinja.pocoo.org/jinja/>`_ template lexer.

    It just highlights django/jinja code between the preprocessor directives,
    other data is left untouched by the lexer.
    zDjango/Jinja�django�jinjazapplication/x-django-templatingzapplication/x-jinjar��\{\{�varz	\{#.*?#\}zJ(\{%)(-?\s*)(comment)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endcomment)(\s*-?)(%\})�B(\{%)(-?\s*)(raw)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endraw)(\s*-?)(%\})z'(\{%)(-?\s*)(filter)(\s+)([a-zA-Z_]\w*)�block�(\{%)(-?\s*)([a-zA-Z_]\w*)r�z(\|)(\s*)([a-zA-Z_]\w*)z#(is)(\s+)(not)?(\s+)?([a-zA-Z_]\w*)z%(_|true|false|none|True|False|None)\bzm(in|as|reversed|recursive|not|and|or|is|if|else|import|with(?:(?:out)?\s*context)?|scoped|ignore\s+missing)\bz(loop|block|super|forloop)\bz[a-zA-Z_][\w-]*z\.\w+�:?"(\\\\|\\[^\\]|[^"\\])*"�:?'(\\\\|\\[^\\]|[^'\\])*'z ([{}()\[\]+\-*/%,:~]|[><=]=?|!=)r�r��
(-?)(\}\})r��varnames�	(-?)(%\})�.)r�r�r�r�cCsPd}t�d|�dur|d7}t�d|�dur|d7}t�d|�dur&|d7}|S)Nr�z\{%\s*(block|extends)r�z\{%\s*if\s*.*?%\}皙�����?z\{\{.*?\}\}r�r�rfrfrlr��szDjangoLexer.analyse_textN)r�r�r�r�r�r�r�r�r��Sr�r rrwrrrrr�r�Pseudo�Builtinr�rr�r�rrrr{r�rfrfrfrlr2@sz
���������������9r2c@s�eZdZdZdZdgZddgZdgZddefd	e	e
jee
je
je
e�e
j�fd
e	e
je
je
je
e�e
j�fde	e
je
je
e�e
j�fde	e
je
je
e�e
j�fd
e
jfde	e
je
e�e
j�fdefde	e
je
e�e�fde	ee�fg
iZdS)r<z�
    Generic `myghty templates`_ lexer. Code that isn't Myghty
    markup is yielded as `Token.Other`.

    .. versionadded:: 0.6

    .. _myghty templates: http://www.myghty.org/
    �Myghty�myghtyz*.myt�autodelegatezapplication/x-myghtyr�r��3(?s)(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)z#(?s)(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)z(<&[^|])(.*?)(,.*?)?(&>)�(?s)(<&\|)(.*?)(,.*?)?(&>)�</&>�(?s)(<%!?)(.*?)(%>)�(?<=^)#[^\n]*(\n|\Z)�(?<=^)(%)([^\n]*)(\n|\Z)��(?sx)
                 (.+?)               # anything, followed by:
                 (?:
                  (?<=\n)(?=[%#]) |  # an eval or comment line
                  (?=</?[%&]) |      # a substitution or block or
                                     # call start or end
                                     # - don't consume
                  (\\\n) |           # an escaped newline
                  \Z                 # end of string
                 )N)r�r�r�r�r�r�r�r�rrr�Tagr�rrrrr rr{rfrfrfrlr<�sJ	
��
������	���r<c�0eZdZdZdZdgZdgZ�fdd�Z�ZS)r=zy
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `HtmlLexer`.

    .. versionadded:: 0.6
    zHTML+Myghtyzhtml+myghtyztext/html+myghtycr�r�)r�rirr<r�r�rfrlri�r�zMyghtyHtmlLexer.__init__�	r�r�r�r�r�r�r�rir�rfrfr�rlr=��r=cr�)r>zx
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `XmlLexer`.

    .. versionadded:: 0.6
    z
XML+Myghtyz
xml+myghtyzapplication/xml+myghtycr�r�)r�rirr<r�r�rfrlri�r�zMyghtyXmlLexer.__init__r�rfrfr�rlr>�r�r>c�4eZdZdZdZddgZgd�Z�fdd�Z�ZS)r@z
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `JavascriptLexer`.

    .. versionadded:: 0.6
    zJavaScript+Myghtyzjavascript+myghtyz	js+myghty)zapplication/x-javascript+myghtyztext/x-javascript+myghtyztext/javascript+mygthycr�r�)r�rirr<r�r�rfrlri�r�zMyghtyJavascriptLexer.__init__r�rfrfr�rlr@��r@cr�)r?zx
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `CssLexer`.

    .. versionadded:: 0.6
    z
CSS+Myghtyz
css+myghtyztext/css+myghtycr�r�)r�rirr<r�r�rfrlrir�zMyghtyCssLexer.__init__r�rfrfr�rlr?�r�r?c@s
eZdZdZdZdgZgd�ZdgZddefde	e
jej
e
j�fd	e	e
jee
je
jee�e
j�fd
e	e
jdddee�e
j�fde	e
je
jee�e
j�fd
e	e
je
jee�e
j�fde
jfde	e
jee�e
j�fdefde	e
jee�e�fde	ee�e�fgiZdd�ZdS)rAz�
    Generic `mason templates`_ lexer. Stolen from Myghty lexer. Code that isn't
    Mason markup is HTML.

    .. _mason templates: http://www.masonhq.com/

    .. versionadded:: 1.4
    �Mason�mason)z*.mz*.mhtmlz*.mcz*.mi�autohandler�dhandlerzapplication/x-masonr�r�z(?s)(<%doc>)(.*?)(</%doc>)r�z%(?s)(<%(\w+)(.*?)(>))(.*?)(</%\2\s*>)Nz(?s)(<&[^|])(.*?)(,.*?)?(&>)r�r�r�r�r�r�cCs8d}t�d|�durd}|St�d|tj�durd}|S)Nr�z</%(class|doc|init)>g�?z<&.+&>g)\��(�?r�)rz�resultrfrfrlr�4s�zMasonLexer.analyse_text)r�r�r�r�r�r�r�r�rrrr�r�	Multiliner�rrr	r rrr{r�rfrfrfrlrAsN�
�������	���!rAc
@s8eZdZdZdZdgZdgZdgZdee	j
eje
e�fdee	j
ejee�e�fdee	j
eje	j
�fd	ejfd
eejej�dfdeejejej�fd
ejdfdeejee�ej�fdeejee�ej�fdeee�fde	fgdejfdejfed�gdeeje	e�fdejdfde	fgdedfdedfdedfgd�ZdS)rBz�
    Generic `mako templates`_ lexer. Code that isn't Mako
    markup is yielded as `Token.Other`.

    .. versionadded:: 0.7

    .. _mako templates: http://www.makotemplates.org/
    �Mako�makoz*.maozapplication/x-makoz(\s*)(%)(\s*end(?:\w+))(\n|\Z)z(\s*)(%)([^\n]*)(\n|\Z)z(\s*)(##[^\n]*)(\n|\Z)z(?s)<%doc>.*?</%doc>z
(<%)([\w.:]+)rz(</%)([\w.:]+)(>)z<%(?=([\w.:]+))�	ondeftagsz(?s)(<%(?:!?))(.*?)(%>)z(\$\{)(.*?)(\})a\(?sx)
                (.+?)                # anything, followed by:
                (?:
                 (?<=\n)(?=%|\#\#) | # an eval or comment line
                 (?=\#\*) |          # multiline comment
                 (?=</?%) |          # a python block
                                     # call start or end
                 (?=\$\{) |          # a substitution
                 (?<=\n)(?=\s*%) |
                                     # - don't consume
                 (\\\n) |            # an escaped newline
                 \Z                  # end of string
                )
            r�rpz'(?<=<%)(include|inherit|namespace|page)z((?:\w+)\s*=)(\s*)(".*?")�/?\s*>r��".*?"�'.*?'�[^\s>]+)r�r�r�attrN)r�r�r�r�r�r�r�r�rrrrrwrr rrr�r�rr�rrr�rr{rfrfrfrlrB=sb	�����
��
��"��
��
�rBcr�)rCzw
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `HtmlLexer`.

    .. versionadded:: 0.7
    z	HTML+Makoz	html+makoztext/html+makocr�r�)r�rirrBr�r�rfrlri�r�zMakoHtmlLexer.__init__r�rfrfr�rlrC�r�rCcr�)rDzv
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `XmlLexer`.

    .. versionadded:: 0.7
    zXML+Makozxml+makozapplication/xml+makocr�r�)r�rirrBr�r�rfrlri�r�zMakoXmlLexer.__init__r�rfrfr�rlrD�r�rDcr�)rEz}
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `JavascriptLexer`.

    .. versionadded:: 0.7
    zJavaScript+Makozjavascript+makozjs+mako)zapplication/x-javascript+makoztext/x-javascript+makoztext/javascript+makocr�r�)r�rirrBr�r�rfrlri�r�zMakoJavascriptLexer.__init__r�rfrfr�rlrE�r�rEcr�)rFzv
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `CssLexer`.

    .. versionadded:: 0.7
    zCSS+Makozcss+makoz
text/css+makocr�r�)r�rirrBr�r�rfrlri�r�zMakoCssLexer.__init__r�rfrfr�rlrF�r�rFc@seZdZdZdd�ZdS)�CheetahPythonLexerzI
    Lexer for handling Cheetah's special $ tokens in Python syntax.
    ccsP�tdi|j��}|�|�D]\}}}|tjkr|dkrtj}|||fVqdS)N�$rf)rrkrxr!rrrw)rjrz�pylexer�pos�type_�valuerfrfrlrx�s��z)CheetahPythonLexer.get_tokens_unprocessedN)r�r�r�r�rxrfrfrfrlr��sr�c@s�eZdZdZdZddgZddgZddgZd	d
ee	�fde	fde	j
fd
e	j
fdee	j
ee�e	j
�fdee	j
ee��fdee	j
ee�e	j
�fde
fdefg	iZdS)rHa2
    Generic `cheetah templates`_ lexer. Code that isn't Cheetah
    markup is yielded as `Token.Other`.  This also works for
    `spitfire templates`_ which use the same syntax.

    .. _cheetah templates: http://www.cheetahtemplate.org/
    .. _spitfire templates: http://code.google.com/p/spitfire/
    �Cheetah�cheetah�spitfirez*.tmplz*.sptzapplication/x-cheetahzapplication/x-spitfirer�z(##[^\n]*)$z#[*](.|\n)*?[*]#z#end[^#\n]*(?:#|$)z#slurp$z(#[a-zA-Z]+)([^#\n]*)(#|$)z(\$)([a-zA-Z_][\w.]*\w)z(?s)(\$\{!?)(.*?)(\})a(?sx)
                (.+?)               # anything, followed by:
                (?:
                 (?=\#[#a-zA-Z]*) | # an eval comment
                 (?=\$[a-zA-Z_{]) | # a substitution
                 \Z                 # end of string
                )
            r�N)r�r�r�r�r�r�r�r�rrrwrr�r rr{rfrfrfrlrH�s@	���������rHcs4eZdZdZdZgd�ZddgZ�fdd�Z�ZS)rIz_
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `HtmlLexer`.
    zHTML+Cheetah)zhtml+cheetahz
html+spitfire�htmlcheetahztext/html+cheetahztext/html+spitfirecr�r�)r�rirrHr�r�rfrlrir�zCheetahHtmlLexer.__init__r�rfrfr�rlrI��rIcs4eZdZdZdZddgZddgZ�fdd�Z�ZS)	rJz^
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `XmlLexer`.
    zXML+Cheetahzxml+cheetahzxml+spitfirezapplication/xml+cheetahzapplication/xml+spitfirecr�r�)r�rirrHr�r�rfrlrir�zCheetahXmlLexer.__init__r�rfrfr�rlrJrrJcs4eZdZdZdZgd�Zgd�Z�fdd�Z�ZS)rKze
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `JavascriptLexer`.
    zJavaScript+Cheetah)zjavascript+cheetahz
js+cheetahzjavascript+spitfirezjs+spitfire)z application/x-javascript+cheetahztext/x-javascript+cheetahztext/javascript+cheetahz!application/x-javascript+spitfireztext/x-javascript+spitfireztext/javascript+spitfirecr�r�)r�rirrHr�r�rfrlri*r�zCheetahJavascriptLexer.__init__r�rfrfr�rlrKsrKc
@s�eZdZdZdZdgZddgZdefdee	e
�fdee	e
j�d	fed
�defgde	d
fde
e�d
fdeee	e
e��d
fded
fdeee	e
�d
fgdee
je
e�e
j�fdejfgd�ZdS)r9z]
    A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ text
    templates.
    zGenshi Text�
genshitextzapplication/x-genshi-textz
text/x-genshiz[^#$\s]+z
^(\s*)(##.*)$z	^(\s*)(#)�	directiver�z[#$\s]z\nr�z(?:def|for|if)\s+.*z (choose|when|with)([^\S\n]+)(.*)z(choose|otherwise)\bz(end\w*)([^\S\n]*)(.*)�(?<!\$)(\$\{)(.+?)(\})z(?<!\$)(\$)([a-zA-Z_][\w.]*))r�r
r�N)r�r�r�r�r�r�r�r rrrrwrrrrrr�r{rfrfrfrlr9.s6���	���
�r9c
@sHeZdZdZejZdefdee	j
ee�e	j
�fdefde
jdfde
jdfed	�d
efgdefde
jd
fde
jdfgdeeee�e�dfdeeee�e�dfdedfgdefde
jd
fde
jdfde
jdfgdedfdedfdedfgdedfed�defgdedfed�defgdefed	�gdee	j
ee�e	j
�fde
jfgd�	ZdS) �GenshiMarkupLexerzX
    Base lexer for Genshi markup, used by `HtmlGenshiLexer` and
    `GenshiLexer`.
    z[^<$]+z(<\?python)(.*?)(\?>)z'<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>z<\s*py:[a-zA-Z0-9]+�pytagz<\s*[a-zA-Z0-9:.]+rr�z[<$]r�z[\w:-]+\s*=�pyattrr�r�z(")(.*?)(")z(')(.*?)(')r�z
py:[\w-]+\s*=r��"�attr-dstring�'�attr-sstringz[^\s>]*�stringsz[^"'$]+rz(?<!\$)(\$)([a-zA-Z_][\w\.]*))	r�r
rrr�rrrr�N)r�r�r�r�r�r�r�r rrrwrrrr�rrr�rr�r{rfrfrfrlrQsb�

�

��


��������
�rcsBeZdZdZdZddgZgd�ZdgZ�fdd�Zd	d
�Z	�Z
S)r8z�
    A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ and
    `kid <http://kid-templating.org/>`_ kid HTML templates.
    zHTML+Genshizhtml+genshizhtml+kid�r��*.htm�*.xhtmlztext/html+genshicr�r�)r�rirrr�r�rfrlri�r�zHtmlGenshiLexer.__init__cC�Fd}t�d|�dur|d7}t�d|�dur|d7}|t�|�dS�Nr�z	\$\{.*?\}皙�����?zpy:(.*?)=["\']r�)r�r�rr�r�rfrfrlr���zHtmlGenshiLexer.analyse_textr�rfrfr�rlr8�sr8csHeZdZdZdZgd�ZdgZdgZddgZ�fdd	�Z	d
d�Z
�ZS)r7z�
    A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ and
    `kid <http://kid-templating.org/>`_ kid XML templates.
    �Genshi)�genshi�kidz
xml+genshizxml+kidz*.kidr�zapplication/x-genshizapplication/x-kidcr�r�)r�rirrr�r�rfrlri�r�zGenshiLexer.__init__cCrr)r�r�rr�r�rfrfrlr��rzGenshiLexer.analyse_text�r�r�r�r�r�r�r�r�r�rir�r�rfrfr�rlr7�sr7c�BeZdZdZdZgd�ZdgZgd�Z�fdd�Zdd	�Z	�Z
S)
r;zK
    A lexer that highlights javascript code in genshi text templates.
    zJavaScript+Genshi Text)z
js+genshitextz	js+genshizjavascript+genshitextzjavascript+genshi�*.js)zapplication/x-javascript+genshiztext/x-javascript+genshiztext/javascript+genshicr�r�)r�rirr9r�r�rfrlri�r�zJavascriptGenshiLexer.__init__cC�t�|�dS�N皙�����?�r7r�r�rfrfrlr���z"JavascriptGenshiLexer.analyse_textr�rfrfr�rlr;�sr;c�@eZdZdZdZddgZdgZdgZ�fdd�Zd	d
�Z	�Z
S)r:zK
    A lexer that highlights CSS definitions in genshi text templates.
    zCSS+Genshi Textzcss+genshitextz
css+genshi�*.cssztext/css+genshicr�r�)r�rirr9r�r�rfrlri�r�zCssGenshiLexer.__init__cCr!r"r$r�rfrfrlr��r%zCssGenshiLexer.analyse_textr�rfrfr�rlr:��r:csHeZdZdZdZgd�ZdgZgd�ZdgZ�fdd�Z	d	d
�Z
�ZS)r)z�
    Subclass of the ERB lexer that highlights the unlexed data with the
    html lexer.

    Nested Javascript and CSS is highlighted too.
    �RHTML)�rhtmlzhtml+erbz	html+rubyz*.rhtmlrztext/html+rubycr�r�)r�rirr(r�r�rfrlri�r�zRhtmlLexer.__init__cCr��Nr�g�?)r(r�r"r�rfrfrlr��szRhtmlLexer.analyse_textrrfrfr�rlr)�sr)cr&)r*zo
    Subclass of `ErbLexer` which highlights data outside preprocessor
    directives with the `XmlLexer`.
    zXML+Rubyzxml+rubyzxml+erbr�zapplication/xml+rubycr�r�)r�rirr(r�r�rfrlri	r�zXmlErbLexer.__init__cCr�r�)r(r�r#r�rfrfrlr�r�zXmlErbLexer.analyse_textr�rfrfr�rlr*�sr*cr&)r+zS
    Subclass of `ErbLexer` which highlights unlexed data with the `CssLexer`.
    zCSS+Rubyzcss+rubyzcss+erbr'z
text/css+rubycr�r�)r�rirr(r�r�rfrlrir�zCssErbLexer.__init__cCr!r"�r(r�r�rfrfrlr� r%zCssErbLexer.analyse_textr�rfrfr�rlr+r(r+cr)
r,z^
    Subclass of `ErbLexer` which highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Ruby)zjavascript+rubyzjs+rubyzjavascript+erbzjs+erbr )zapplication/x-javascript+rubyztext/x-javascript+rubyztext/javascript+rubycr�r�)r�rirr(r�r�rfrlri1r�zJavascriptErbLexer.__init__cCr!r"r,r�rfrfrlr�4r%zJavascriptErbLexer.analyse_textr�rfrfr�rlr,$�r,csHeZdZdZdZdgZdgZgd�Zgd�Z�fdd�Z	d	d
�Z
�ZS)r$z�
    Subclass of `PhpLexer` that highlights unhandled data with the `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+PHPzhtml+phpz*.phtml)�*.phpr�rr�
*.php[345])zapplication/x-phpzapplication/x-httpd-phpzapplication/x-httpd-php3zapplication/x-httpd-php4zapplication/x-httpd-php5cr�r�)r�rirrr�r�rfrlriHr�zHtmlPhpLexer.__init__cCr�r+)rr�r"r�rfrfrlr�Kr�zHtmlPhpLexer.analyse_textrrfrfr�rlr$8sr$c�@eZdZdZdZdgZgd�ZdgZ�fdd�Zdd	�Z	�Z
S)
r%zT
    Subclass of `PhpLexer` that highlights unhandled data with the `XmlLexer`.
    zXML+PHPzxml+php)r�r.r/zapplication/xml+phpcr�r�)r�rirrr�r�rfrlri\r�zXmlPhpLexer.__init__cCr�r�)rr�r#r�rfrfrlr�_r�zXmlPhpLexer.analyse_textr�rfrfr�rlr%Rsr%c�>eZdZdZdZdgZdgZdgZ�fdd�Zdd	�Z	�Z
S)
r&zU
    Subclass of `PhpLexer` which highlights unmatched data with the `CssLexer`.
    zCSS+PHPzcss+phpr'ztext/css+phpcr�r�)r�rirrr�r�rfrlripr�zCssPhpLexer.__init__cCr!r"�rr�r�rfrfrlr�sr%zCssPhpLexer.analyse_textr�rfrfr�rlr&fsr&c�BeZdZdZdZddgZdgZgd�Z�fdd�Zd	d
�Z	�Z
S)r'z`
    Subclass of `PhpLexer` which highlights unmatched data with the
    `JavascriptLexer`.
    zJavaScript+PHPzjavascript+phpzjs+phpr )zapplication/x-javascript+phpztext/x-javascript+phpztext/javascript+phpcr�r�)r�rirrr�r�rfrlri�r�zJavascriptPhpLexer.__init__cC�
t�|�Sr�r2r�rfrfrlr���
zJavascriptPhpLexer.analyse_textr�rfrfr�rlr'wr-r'cr0)
r.z�
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+Smartyzhtml+smarty)r�rrr�ztext/html+smartycr�r�)r�rirr-r�r�rfrlri�r�zHtmlSmartyLexer.__init__cCr�r+)r-r�r"r�rfrfrlr��r�zHtmlSmartyLexer.analyse_textr�rfrfr�rlr.�sr.cr�)r/z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `XmlLexer`.
    z
XML+Smartyz
xml+smartyr�r�zapplication/xml+smartycr�r�)r�rirr-r�r�rfrlri�r�zXmlSmartyLexer.__init__cCr�r�)r-r�r#r�rfrfrlr��r�zXmlSmartyLexer.analyse_textr�rfrfr�rlr/��r/cr�)r0z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `CssLexer`.
    z
CSS+Smartyz
css+smartyr'r�ztext/css+smartycr�r�)r�rirr-r�r�rfrlri�r�zCssSmartyLexer.__init__cCr!r"�r-r�r�rfrfrlr��r%zCssSmartyLexer.analyse_textr�rfrfr�rlr0�r6r0csDeZdZdZdZddgZddgZgd�Z�fdd	�Zd
d�Z	�Z
S)r1zd
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Smartyzjavascript+smartyz	js+smartyr r�)zapplication/x-javascript+smartyztext/x-javascript+smartyztext/javascript+smartycr�r�)r�rirr-r�r�rfrlri�r�zJavascriptSmartyLexer.__init__cCr!r"r7r�rfrfrlr��r%z"JavascriptSmartyLexer.analyse_textr�rfrfr�rlr1�sr1csDeZdZdZdZgd�Zgd�ZddgZ�fdd�Zd	d
�Z	�Z
S)r3z�
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+Django/Jinja)zhtml+djangoz
html+jinja�
htmldjangorztext/html+djangoztext/html+jinjacr�r�)r�rirr2r�r�rfrlri�r�zHtmlDjangoLexer.__init__cCr�r+)r2r�r"r�rfrfrlr��r�zHtmlDjangoLexer.analyse_textr�rfrfr�rlr3�sr3c�BeZdZdZdZddgZdgZddgZ�fdd	�Zd
d�Z	�Z
S)r5z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `XmlLexer`.
    zXML+Django/Jinjaz
xml+djangoz	xml+jinjar�zapplication/xml+djangozapplication/xml+jinjacr�r�)r�rirr2r�r�rfrlri�r�zXmlDjangoLexer.__init__cCr�r�)r2r�r#r�rfrfrlr�r�zXmlDjangoLexer.analyse_textr�rfrfr�rlr5��r5cr9)r4z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `CssLexer`.
    zCSS+Django/Jinjaz
css+djangoz	css+jinjar'ztext/css+djangoztext/css+jinjacr�r�)r�rirr2r�r�rfrlrir�zCssDjangoLexer.__init__cCr!r"�r2r�r�rfrfrlr�r%zCssDjangoLexer.analyse_textr�rfrfr�rlr4	r:r4cr)
r6zd
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Django/Jinja)zjavascript+djangoz	js+djangozjavascript+jinjazjs+jinjar )zapplication/x-javascript+djangozapplication/x-javascript+jinjaztext/x-javascript+djangoztext/x-javascript+jinjaztext/javascript+djangoztext/javascript+jinjacr�r�)r�rirr2r�r�rfrlri,r�zJavascriptDjangoLexer.__init__cCr!r"r;r�rfrfrlr�/r%z"JavascriptDjangoLexer.analyse_textr�rfrfr�rlr6sr6c@sFeZdZdZdedfdefdefdefgdedfd	ee�fgd
�ZdS)�JspRootLexerzt
    Base for the `JspLexer`. Yields `Token.Other` for area outside of
    JSP tags.

    .. versionadded:: 0.7
    �<%\S?�seczC</?jsp:(forward|getProperty|include|plugin|setProperty|useBean).*?>�[^<]+�<rqr��[\w\W]+?(?=%>|\Z)�r�r>N)	r�r�r�r�rr rr
r{rfrfrfrlr<3s	��	
�
�r<cr1)
rGzA
    Lexer for Java Server Pages.

    .. versionadded:: 0.7
    zJava Server Page�jspz*.jspzapplication/x-jspcr�r��r�rirr<r�r�rfrlriWr�zJspLexer.__init__cC�:t�|�d}t|�r|d7}d|vrd|vr|d7}|S�Nr�r�rprqr�)r
r�r#r�rfrfrlr�Z�zJspLexer.analyse_text�r�r�r�r�r�r�r�r�rir�r�rfrfr�rlrGL�rGc@s�eZdZdZdZdgZdgZdgZej	Z
defdej
dfd	efd
ej
fdeeejedee�fd
eeejedeee�e�fdeeejedee�e�fdeeej�fdeedee�ejdde�fdefg
dej
fdej
dfdej
dfdej
fgd�Zdd�ZdS)rLzR
    For files using the Evoque templating system.

    .. versionadded:: 1.1
    �Evoque�evoquez*.evoquezapplication/x-evoquez[^#$]+z#\[�commentz\$\$z\$\w+:[^$\n]*\$z'(\$)(begin|end)(\{(%)?)(.*?)((?(4)%)\})Nz>(\$)(evoque|overlay)(\{(%)?)(\s*[#\w\-"\'.]+)?(.*?)((?(4)%)\})z!(\$)(\w+)(\{(%)?)(.*?)((?(4)%)\})z(\$)(else|rof|fi)z%(\$\{(%)?)(.*?)((!)(.*?))?((?(2)%)\})�#z[^\]#]r�z\]#r�z[\]#])r�rLcCsd|vrdSdS)z.Evoque templates use $evoque, which is unique.z$evoquermNrfr�rfrfrlr��s�zEvoqueLexer.analyse_text)r�r�r�r�r�r�r�r�r�r�r�r rr�rrrr�rrrr{r�rfrfrfrlrLcsR
��
����
���

��'rLcr1)
rMzy
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 1.1
    zHTML+Evoquezhtml+evoquer�ztext/html+evoquecr�r�)r�rirrLr�r�rfrlri�r�zEvoqueHtmlLexer.__init__cCr4r��rLr�r�rfrfrlr��r5zEvoqueHtmlLexer.analyse_textrHrfrfr�rlrM��rMcr1)
rNzx
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `XmlLexer`.

    .. versionadded:: 1.1
    z
XML+Evoquez
xml+evoquer�zapplication/xml+evoquecr�r�)r�rirrLr�r�rfrlri�r�zEvoqueXmlLexer.__init__cCr4r�rNr�rfrfrlr��r5zEvoqueXmlLexer.analyse_textrHrfrfr�rlrN�rOrNc@s�eZdZdZdZdgZgZgZej	Z
dejfdej
fdefdefdefd	efd
efdefdefd
ejdfdejfdefdefdejfdejfdeejee�fdejfdefdefgdejfdejfdejfdejfd
ejdfgd�ZdS)rOz
    Coldfusion statements
    �cfstatement�cfsz//.*?\nz/\*(?:.|\n)*?\*/z\+\+|--z
[-+*/^&=!]z<=|>=|<|>|==zmod\bz"(eq|lt|gt|lte|gte|not|is|and|or)\bz\|\||&&z\?r�stringr��\d+z�(if|else|len|var|xml|default|break|switch|component|property|function|do|try|catch|in|continue|for|return|while|required|any|array|binary|boolean|component|date|guid|numeric|query|string|struct|uuid|case)\br�zD(application|session|client|cookie|super|this|variables|arguments)\bz([a-z_$][\w.]*)(\s*)(\()z
[a-z_$][\w.]*z[()\[\]{};:,.\\]r�z""z#.+?#z[^"#]+rMr�)r�rRN)r�r�r�r�r�r�r�r�r��
IGNORECASEr�rr�r�rrr�rrr�rrr�rrr��Interpr{rfrfrfrlrO�sP
����
�
�rOc
@s�eZdZdZdZdgZgZgZdefe	d�defgde
jdfd	e
fd
ej
dfdeej
ee�ej
�fd
eej
ee�ej
�fgdefdeeee�e�fdej
dfe	d�defdefgde
jdfde
jdfde
jfgd�ZdS)�ColdfusionMarkupLexerz 
    Coldfusion markup only
    �
Coldfusion�cfr?�tagsz<[^<>]*z<!---�	cfcommentz(?s)<!--.*?-->z
<cfoutput.*?>�cfoutputz((?s)(<cfscript.*?>)(.+?)(</cfscript.*?>)z�(?s)(</?cf(?:component|include|if|else|elseif|loop|return|dbinfo|dump|abort|location|invoke|throw|file|savecontent|mailpart|mail|header|content|zip|image|lock|argument|try|catch|break|directory|http|set|function|param)\b)(.*?)((?<!\\)>)z[^#<]+z(#)(.*?)(#)z</cfoutput.*?>r�z(?s)<[^<>]*rMr�z--->z([^<-]|<(?!!---)|-(?!-->))+)r�rYr[rZN)r�r�r�r�r�r�r�r�r rrr�rr�rrrOrr{rfrfrfrlrV�sD�

����
�

�
�rVcr�)	rPz#
    Coldfusion markup in html
    zColdfusion HTML�cfmz*.cfmz*.cfmlzapplication/x-coldfusioncr�r�)r�rirrVr�r�rfrlri)r�zColdfusionHtmlLexer.__init__�
r�r�r�r�r�r�r�r�rir�rfrfr�rlrP srPcs4eZdZdZdZdgZdgZgZ�fdd�Z�Z	S)rQzH
    Coldfusion markup/script components

    .. versionadded:: 2.0
    zColdfusion CFC�cfcz*.cfccr�r�)r�rirPrOr�r�rfrlri8r�zColdfusionCFCLexer.__init__r]rfrfr�rlrQ-srQcr1)
rUzD
    Lexer for Scalate Server Pages.

    .. versionadded:: 1.4
    zScalate Server Page�sspz*.sspzapplication/x-sspcr�r�rDr�r�rfrlriGr�zSspLexer.__init__cCsDd}t�d|�r|d7}t|�r|d7}d|vr d|vr |d7}|S)Nr�zval \w+\s*:g333333�?rrprqr�)r�r�r#r�rfrfrlr�JszSspLexer.analyse_textrHrfrfr�rlrU<rIrUc@s@eZdZdZdedfdefdefgdedfdee�fgd	�Zd
S)�TeaTemplateRootLexerz
    Base for the `TeaTemplateLexer`. Yields `Token.Other` for area outside of
    code blocks.

    .. versionadded:: 1.5
    r=r>r?r@rqr�rArBN)	r�r�r�r�rr rrr{rfrfrfrlr`Us	�
�
�r`cr1)
rVzW
    Lexer for `Tea Templates <http://teatrove.org/>`_.

    .. versionadded:: 1.5
    �Tea�teaz*.teaz
text/x-teacr�r�)r�rirr`r�r�rfrlrivr�zTeaTemplateLexer.__init__cCrErF)rr�r#r�rfrfrlr�yrGzTeaTemplateLexer.analyse_textrHrfrfr�rlrVkrIrVcsBeZdZdZdZdgZgd�Zgd�Z�fdd�Zdd	�Z	�Z
S)
rWz�
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `HtmlLexer`.

    Nested JavaScript and CSS is also highlighted.

    .. versionadded:: 1.6
    z
HTML+Lassoz
html+lasso)r�rr�*.lasso�*.lasso[89]�*.incl�*.inc�*.las)ztext/html+lassozapplication/x-httpd-lassozapplication/x-httpd-lasso[89]cr�r�)r�rirrr�r�rfrlri�r�zLassoHtmlLexer.__init__cCr�r+)rr�r"r�rfrfrlr��r�zLassoHtmlLexer.analyse_textr�rfrfr�rlrW�s	rWcr0)
rXzz
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `XmlLexer`.

    .. versionadded:: 1.6
    z	XML+Lassoz	xml+lasso)r�rcrdrerfrgzapplication/xml+lassocr�r�)r�rirrr�r�rfrlri�r�zLassoXmlLexer.__init__cCr�r�)rr�r#r�rfrfrlr��r�zLassoXmlLexer.analyse_textr�rfrfr�rlrX�srXcr1)
rYzz
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `CssLexer`.

    .. versionadded:: 1.6
    z	CSS+Lassoz	css+lassor'ztext/css+lassoc�"d|d<t�jttfi|��dS�NT�requiredelimiters)r�rirrr�r�rfrlri��zLassoCssLexer.__init__cCs6t�|�d}t�d|�r|d7}d|vr|d7}|S)Nr#z
\w+:[^;]+;r�zpadding:)rr�r�r�r�rfrfrlr��szLassoCssLexer.analyse_textr�rfrfr�rlrY�srYcr3)rZz�
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `JavascriptLexer`.

    .. versionadded:: 1.6
    zJavaScript+Lassozjavascript+lassozjs+lassor )zapplication/x-javascript+lassoztext/x-javascript+lassoztext/javascript+lassocrhri)r�rirrr�r�rfrlri�rkzLassoJavascriptLexer.__init__cCst�|�d}|Sr")rr�r�rfrfrlr��sz!LassoJavascriptLexer.analyse_textr�rfrfr�rlrZ�srZc
@sFeZdZdZdZdgZdefdefdeej	e
�dfdeejej
ej
�dfd	eeje
�dfgd
e
fdej	dfd
eeej�dfdeej
e�fdeee
e�fdeee
ej�fdeee
e�dfed�gd
e
fdedfdeee
eje
�fdeee
eedd��fdejfed�gdejfdejfdejfged�dejfdejfdefgd �Zd!S)"r[z�
    Generic `handlebars <http://handlebarsjs.com/>` template lexer.

    Highlights only the Handlebars template tags (stuff between `{{` and `}}`).
    Everything else is left for a delegating lexer.

    .. versionadded:: 2.0
    �
Handlebars�
handlebarsr�z\{\{!.*\}\}z
(\{\{\{)(\s*)rz(\{\{)([#~/]+)([^\s}]*)�(\{\{)(\s*)r�z\}\}\}r�z
(~?)(\}\})z([^\s}]+)(=)z(>)(\s*)(@partial-block)z(#?>)(\s*)([\w-]+)z(>)(\s*)(\()�dynamic-partial�genericr�z(lookup)(\s+)(\.|this)(\s+)z(lookup)(\s+)(\S+)r��r|z[\w-]+z[()/@a-zA-Z][\w-]*z\.[\w-]+z(this\/|\.\/|(\.\.\/)+)[\w-]+r�r�r�)r�rror�rpN)r�r�r�r�r�r�r rr�Specialrrwrr�rrrr�rrrrr�rr�r�r{rfrfrfrlr[�s\	��
���
��
���
�r[cs:eZdZdZdZdgZddgZddgZ�fdd	�Z�Z	S)
r\z}
    Subclass of the `HandlebarsLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    zHTML+Handlebarszhtml+handlebarsz*.handlebarsz*.hbsztext/html+handlebarsztext/x-handlebars-templatecr�r�)r�rirr[r�r�rfrlriAr�zHandlebarsHtmlLexer.__init__r]rfrfr�rlr\4sr\cs:eZdZdZdZgd�ZdgZddgZ�fdd�Z�Z	S)	r]z�
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `YamlLexer`.

    Commonly used in Saltstack salt states.

    .. versionadded:: 2.0
    z
YAML+Jinja)z
yaml+jinja�salt�slsz*.slsztext/x-yaml+jinjaz
text/x-slscr�r�)r�rirr2r�r�rfrlriTr�zYamlJinjaLexer.__init__r]rfrfr�rlr]Es	r]c@s�eZdZdZdZdgZdgZiddefdee	e
�dfdee	e
eed	d
��dfdefg�dd
e
jdfdee
je
�eddd	�fdee
je
e	�dfdeeje
eedd
�e
e	�dfdeeje
e	�dfdeeje
e	�dfdee
jde
e	�dfdeejde
e	�dfdeeje
eed	d
�e	e
�dfdeeje
�d fg
�ded�d!e	dfd"e	d#fg�d#ed�d!e	d$fd%eeje	e
�d&fg�d&d"e	dfed'�ed(�g�ded�ed�d)eeed	d
�e
ee
eed	d
�e
e	�fd*efd+ejfd,eeed	d
�e
eje
eed	d
��fed	�ed�g�d-ed	�ed.�g�d/d0ee
ede
�dfd1ee
eje
�dfg�d'd!e	dfg�dd2e	d$fg�d.d3e
dfg�d4ed�d5eeje
e�fd6ee	e
eedd
�e
e	�fed7�ed8�ed9�d:e	fg�d(ed4�d;efg�d<ed4�ed�d;efg�d d2e	d$fed(�g�dd2e	d$fed<�g�d9d=e
jfg�d>ejfd?e	fgd@ejfdAejfgdBejfdCejfged9�ed7�ed8�ed�gdDe
fgdEee	e
eje
e	�d$fd;efgdefdFee	e
eje
e	�dfdefgdG��Z dS)Hr^zw
    Lexer for `Liquid templates
    <http://www.rubydoc.info/github/Shopify/liquid>`_.

    .. versionadded:: 2.0
    �liquidz*.liquidr�r�z
(\{%)(\s*)ztag-or-blockz(\{\{)(\s*)([^\s}]+)rprq�outputr�z(if|unless|elsif|case)(?=\s+)�	conditionz(when)(\s+)zend-of-block�
whitespacez(else)(\s*)(%\})r�z!(capture)(\s+)([^\s%]+)(\s*)(%\})r�z(comment)(\s*)(%\})rLz(raw)(\s*)(%\})�rawz(end(case|unless|if))(\s*)(%\})Nz(end([^\s%]+))(\s*)(%\})z"(cycle)(\s+)(?:([^\s:]*)(:))?(\s*)zvariable-tag-markupz([^\s%]+)(\s*)z
tag-markup�\}\}z\|�filters)r�r�z([^\s|:]+)(:?)(\s*)z
filter-markupz
end-of-tagzdefault-param-markupz/([^\s=!><]+)(\s*)([=!><]=?)(\s*)(\S+)(\s*)(%\})z\b!z\bnot\bz*([\w.\'"]+)(\s+)(contains)(\s+)([\w.\'"]+)z
generic-valuezend-at-whitespace�operatorz(\s*)((=|!|>|<)=?)(\s*)z(\s*)(\bcontains\b)(\s*)z%\}r�zparam-markupz([^\s=:]+)(\s*)(=|:)z(\{\{)(\s*)([^\s}])(\s*)(\}\})rR�number�keyword�,r�zvariable-param-markupz\b(false|true)\br�z(?<=\w)\.(?=\w)z'[^']*'z"[^"]*"z\d+\.\d+rSz[ \t]+z (\{%)(\s*)(endcomment)(\s*)(%\})z(\{%)(\s*)(endraw)(\s*)(%\}))r�rRr}rprxrLry)!r�r�r�r�r�r�r�rrrrrrr�Reservedrrr�rr�r�Wordr�r�r�rr�r�r�Float�Integerrr{rfrfrfrlr^Xs����

������������-��4���<��B������T��Y����`��d��h��m�����}�����	����������������������r^c@s�eZdZdZdZdgZdgZejej	BZ
dZdZdedZ
ee
Zd	efd
ejdfdefd
eejeeeejeejeeeej�fdeejeeeejeejeeeej�fdeeejeeeej�dfdeejee�dfdefgdeeeeej�fdeeeeeeej�fdejfdefdejfeejfdeejfdefdejfdejfdefdefgdefdeeej�d fed!�gdefd"eeej�d fed!�d#e fgd$�Z!d%S)&r_z�
    `Twig <http://twig.sensiolabs.org/>`_ template lexer.

    It just highlights Twig code between the preprocessor directives,
    other data is left untouched by the lexer.

    .. versionadded:: 2.0
    �Twig�twigzapplication/x-twigz[\\\w-]|[^\x00-\x7f]z(?:[\\_a-z]|[^\x00-\x7f])z(?:z)*r�r�r�z\{\#.*?\#\}r�zL(\{%)(-?\s*)(verbatim)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endverbatim)(\s*-?)(%\})z(\{%%)(-?\s*)(filter)(\s+)(%s)rr�r�z
(\|)(\s*)(%s)z(is)(\s+)(not)?(\s*)(%s)z(?i)(true|false|none|null)\bz�(in|not|and|b-and|or|b-or|b-xor|isif|elseif|else|importconstant|defined|divisibleby|empty|even|iterable|odd|sameasmatches|starts\s+with|ends\s+with)\bz(loop|block|parent)\bz\.z\.[0-9]+r�r�z4([{}()\[\]+\-*/,:~%]|\.\.|\?|:|\*\*|\/\/|!=|[><=]=?)r�r�r�r�r�r�r�)r�r�r�rN)"r�r�r�r�r�r�r�r�r�r�r��_ident_char�_ident_begin�
_ident_end�_ident_innerr rrwrrrrr�rr�r�r�rrr�r�rrr{rfrfrfrlr_&s�	
��������������
�r_cs6eZdZdZdZdgZdgZdgZ�fdd�Z�Z	S)r`zw
    Subclass of the `TwigLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    z	HTML+Twigz	html+twigz*.twigztext/html+twigcr�r�)r�rirr_r�r�rfrlri�r�zTwigHtmlLexer.__init__r]rfrfr�rlr`ysr`c@s�eZdZdZdZdgZdefdeej	e
�dfdeeej
ee
ee
�dfd	eeej
ee
�fd
eeej
e
ee
�dfdeeej
e
�fgde
fd
ej	dfdejfdejfdejfdefdejfdejfdeee
ee
ee
ee
�fg	dedfdedfdedfgd�ZdS)raad
    Generic
    `angular2 <http://victorsavkin.com/post/119943127151/angular-2-template-syntax>`_
    template lexer.

    Highlights only the Angular template tags (stuff between `{{` and `}}` and
    special attributes: '(event)=', '[property]=', '[(twoWayBinding)]=').
    Everything else is left for a delegating lexer.

    .. versionadded:: 2.1
    �Angular2�ng2z	[^{([*#]+rn�ngExpressionz&([([]+)([\w:.-]+)([\])]+)(\s*)(=)(\s*)r�z([([]+)([\w:.-]+)([\])]+)(\s*)z([*#])([\w:.-]+)(\s*)(=)(\s*)z([*#])([\w:.-]+)(\s*)z\s+(\|\s+)?rzr�z:?(true|false)r�r�r�z[a-zA-Z][\w-]*(\(.*\))?z\.[\w-]+(\(.*\))?z-(\?)(\s*)([^}\s]+)(\s*)(:)(\s*)([^}\s]+)(\s*)r�r�r�)r�r�r�N)r�r�r�r�r�r�r rrrwrrrr�rr�Booleanr�r�rr�r{rfrfrfrlra�sN�����
����
�racr�)rbz{
    Subclass of the `Angular2Lexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    zHTML + Angular2zhtml+ng2z*.ng2cr�r�)r�rirrar�r�rfrlri�r�zAngular2HtmlLexer.__init__)	r�r�r�r�r�r�r�rir�rfrfr�rlrb�r�rb)tr�r��pygments.lexers.htmlrr�pygments.lexers.javascriptrr�pygments.lexers.cssr�pygments.lexers.phpr�pygments.lexers.pythonr�pygments.lexers.perlr	�pygments.lexers.jvmr
r�pygments.lexers.datar�pygments.lexerr
rrrrrrrr�pygments.tokenrrrrrrrrrrr r!�
pygments.utilr"r#�__all__r(r-rRrSrTr2r<r=r>r@r?rArBrCrDrErFr�rHrIrJrKr9rr8r7r;r:r)r*r+r,r$r%r&r'r.r/r0r1r3r5r4r6r<rGrLrMrNrOrVrPrQrUr`rVrWrXrYrZr[r\r]r^r_r`rarbrfrfrfrl�<module>s�
,8_8RS08D
,#@90.
LOS@

https://t.me/RX1948 - 2025