HEX
Server: Apache/2.4.67 (Debian)
System: Linux vps-b2547eb4 6.1.0-41-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pygments/lexers/__pycache__/templates.cpython-311.pyc
�

�E�c����dZddlZddlmZmZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZmZdd
lmZddlmZddlmZmZmZmZmZmZmZmZm Z dd
l!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-ddl.m/Z/m0Z0gd�Z1Gd�de��Z2Gd�de��Z3Gd�de��Z4Gd�de��Z5Gd�de��Z6Gd�de��Z7Gd�de��Z8Gd�de��Z9Gd �d!e��Z:Gd"�d#e��Z;Gd$�d%e��Z<Gd&�d'e��Z=Gd(�d)e��Z>Gd*�d+e��Z?Gd,�d-e��Z@Gd.�d/e��ZAGd0�d1e��ZBGd2�d3e��ZCGd4�d5e��ZDGd6�d7e��ZEGd8�d9e��ZFGd:�d;e��ZGGd<�d=e��ZHGd>�d?e��ZIGd@�dAe��ZJGdB�dCe��ZKGdD�dEe��ZLGdF�dGe��ZMGdH�dIe��ZNGdJ�dKe��ZOGdL�dMe��ZPGdN�dOe��ZQGdP�dQe��ZRGdR�dSe��ZSGdT�dUe��ZTGdV�dWe��ZUGdX�dYe��ZVGdZ�d[e��ZWGd\�d]e��ZXGd^�d_e��ZYGd`�dae��ZZGdb�dce��Z[Gdd�dee��Z\Gdf�dge��Z]Gdh�die��Z^Gdj�dke��Z_Gdl�dme��Z`Gdn�doe��ZaGdp�dqe��ZbGdr�dse��ZcGdt�due��ZdGdv�dwe��ZeGdx�dye��ZfGdz�d{e��ZgGd|�d}e��ZhGd~�de��ZiGd��d�e��ZjGd��d�e��ZkGd��d�e��ZlGd��d�e��ZmGd��d�e��ZnGd��d�e��ZoGd��d�e��ZpGd��d�e��ZqGd��d�e��ZrGd��d�e��ZsGd��d�e��ZtGd��d�e��ZuGd��d�e��ZvdS)�z�
    pygments.lexers.templates
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for various template engines' markup.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�	HtmlLexer�XmlLexer)�JavascriptLexer�
LassoLexer)�CssLexer)�PhpLexer)�PythonLexer)�	PerlLexer)�	JavaLexer�TeaLangLexer)�	YamlLexer)�SqlLexer)	�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�Angular2HtmlLexer�
SqlJinjaLexerc�d�eZdZdZdZdZdgZdgZej	dej
��Zd�Zd�Z
d	�Zd
S)r*z�
    Generic ERB (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`.
    �ERBzhttps://github.com/ruby/erb�erbzapplication/x-ruby-templatingz*(<%%|%%>|<%=|<%#|<%-|<%|-%>|%>|^%[^%].*?$)c�P�ddlm}|di|��|_tj|fi|��dS)Nr)�	RubyLexer�)�pygments.lexers.rubyrj�
ruby_lexerr�__init__)�self�optionsrjs   �;/usr/lib/python3/dist-packages/pygments/lexers/templates.pyrnzErbLexer.__init__DsI��2�2�2�2�2�2�#�)�.�.�g�.�.���
��t�'�'�w�'�'�'�'�'�c#��K�|j�|��}|���dx}}		|dkr6|���}|t|fV�|t|��z
}d}�n�|dk�r�|���}|dvr|t|fV�|dz
}d}�n�|dkrM|tj|fV�|���}|dzt|fV�|dt|��zz
}d}�nV|dvry|tj|fV�|t|��z
}|���}d}|j�	|��D]\}}	}
||z|	|
fV��|t|��z
}d}n�|d	vr!|t|fV�|t|��z
}d}n�|tj|dfV�d}|j�	|dd
���D]\}}	}
|dz|z|	|
fV��|t|��z
}d}nP|dkrJ|���}|d	vr
|t|fV�n|tj|fV�|t|��z
}d}��#t$rYd
SwxYw)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�Preprocrm�get_tokens_unprocessedr�
IndexError)ro�text�tokens�state�idx�val�tag�data�r_idx�r_token�r_values           rqrzErbLexer.get_tokens_unprocessedIs�������%�%�d�+�+������������9	�6
��A�:�:� �*�*�,�,�C��u�c�/�)�)�)��3�s�8�8�O�C��E�E��a�Z�Z� �*�*�,�,�C��n�,�,�!�5�#�o�-�-�-��q��� !�������!�7�?�C�7�7�7�7�$�j�j�l�l��!�A�g�w��3�3�3�3��q�3�s�8�8�|�+�� !���� 4�4�4�!�7�?�C�7�7�7�7��s�3�x�x���%�z�z�|�|�� !�� $�� F� F�t� L� L�@�@�3�E�7�G�"'�#�+�w��"?�?�?�?�?��s�4�y�y�(�� !����
�-�-�!�5�#�o�-�-�-��s�3�x�x��� !���"�7�?�C��F�:�:�:�:� !�� $�� F� F�s�1�2�2�w� O� O�D�D�3�E�7�G�"%��'�E�/�7�G�"C�C�C�C�C��s�3�x�x��� !����a�Z�Z� �*�*�,�,�C��-�/�/�!�5�#�o�-�-�-�-�!�7�?�C�7�7�7�7��3�s�8�8�O�C��E�m6
��n�	�	�	��F�F�	���s�HI�
I �I c��d|vrd|vrdSdSdS)Nrwrx皙�����?rk�r�s rq�analyse_textzErbLexer.analyse_text�s#���4�<�<�D�D�L�L��3��<�L�LrrN)�__name__�
__module__�__qualname__�__doc__�name�url�aliases�	mimetypes�re�compile�Mryrnrr�rkrrrqr*r*3s����������D�
'�C��g�G�0�1�I���
�H�"�$�O�O�I�(�(�(�
B�B�B�H����rrr*c
��eZdZdZdZdZdgZdgZdgZe	j
e	jzZde
fdeejeej��fd	eejeed
���ej��fdeejeje��dfd
ejdfgdefd
ejdfdejdfdejfdejfdefdejfdefdejfdejfdejfgd�Zd�Z dS)r/z�
    Generic Smarty template lexer.

    Just highlights smarty code between the preprocessor directives, other
    data is left untouched by the lexer.
    �Smartyzhttps://www.smarty.net/�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�c���d}tjd|��r|dz
}tjd|��r|dz
}tjd|��r|dz
}tjd|��r|dz
}|S)N�z\{if\s+.*?\}.*?\{/if\}�333333�?z\{include\s+file=.*?\}z \{foreach\s+.*?\}.*?\{/foreach\}z	\{\$.*?\}�{�G�z�?�r��search�r��rvs  rqr�zSmartyLexer.analyse_text�s���
��
�9�.��5�5�	��$�J�B�
�9�.��5�5�	��$�J�B�
�9�8�$�?�?�	��$�J�B�
�9�\�4�(�(�	��$�J�B��	rrN)!r�r�r�r�r�r�r��	filenamesr�r��	MULTILINE�DOTALL�flagsr"rrr~rrr�Functionr�Variablerr�Constantr!r �Double�Single�	Attributer�r�rkrrrqr/r/�sm���������D�
#�C��j�G��	�I�'�(�I��L�2�9�$�E��u��
!�
�X�g�o�w���
@�
@�
B�
(�
�X�g�o�u�u�X�4�'H�'H�'H��o�'�'�
(�*�
�X�g�o�t�}�d�
;�
;�X�
G�
�G�O�X�.�

��T�N�
�G�O�W�-�
�G�O�V�,�
��
�.�
&��
�6�
+�X�6�
#�W�%5�6�'�(.�
0�
(�&�-�8�
(�&�-�8�
�d�n�-�

���F�8
�
�
�
�
rrr/c��eZdZdZdZdZdgZddgZej	ej
zZdZde
fd	eejeej��fd
eeje��fdezdzeejejeje��d
fdezdzeejejej��fdedfgeejfdedfdezdzeeej��dfdedfed��gdefdedfdezdzejfed��gdefed��dedfgdedfdefdefd ejfd!ejfd"efd#efd$ejfdedfd%edfd&edfdedfdedfdedfgd'�Zd(�Z d)S)*rTz�
    Generic Velocity template lexer.

    Just highlights velocity directives and variable references, other
    data is left untouched by the lexer.
    �Velocityzhttps://velocity.apache.org/�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�c��d}tjd|tj��r|dz
}tjd|tj��r|dz
}tjd|tj��r|dz
}tjd|��r|dz
}|S)	Nr�z #\{?macro\}?\(.*?\).*?#\{?end\}?��?z#\{?if\}?\(.+?\).*?#\{?end\}?r�z"#\{?foreach\}?\(.+?\).*?#\{?end\}?z6\$!?\{?[a-zA-Z_]\w*(\([^)]*\))?(\.\w+(\([^)]*\))?)*\}?r��r�r�r�r�s  rqr�zVelocityLexer.analyse_texts���
��
�9�8�$��	�J�J�	��$�J�B�
�9�5�t�R�Y�G�G�	��$�J�B�
�9�:�D�"�)�L�L�	��$�J�B�
�9�0�15�7�7�	��$�J�B��	rrN)!r�r�r�r�r�r�r�r�r�r�r�r��
identifierr"rrr~rr�rr�rrrrr r�r�r!rr�r�r�rkrrrqrTrT�sZ���������D�
(�C��l�G���#�I��L�2�9�$�E� �J����
�
�X�g�o�w���
@�
@�
B�
�
�X�g�o�w�
/�
/�
1�
�*�
$�'7�
7�
�X�g�o�t�}�g�o�{�
S�
S�
�
 ��*�
$�{�
2�
�X�g�o�t�}�g�o�
F�
F�
H�
��j�1�
����'�
�K��.�
�
�
"�T�
)�
�X�k�4�=�
1�
1�7�
<�
�K��(��G�F�O�O�

�N�
�
�
�H�o�.�
�Z�
�%�
'���7��G�L�!�!�
��h���G�L�!�!�
�H�f�%�
���j�1�
�T�N�
�k�"�
(�&�-�8�
(�&�-�8�
&��/�
�F�#�
#�W�%5�6�
�K��)�
�K��(�
�K��)�
�K��(�
�K��)�
�K��(�
�E2�2�F�h����rrrTc�:��eZdZdZdZdgZddgZdgZ�fd�Z�xZ	S)rUza
    Subclass of the `VelocityLexer` that highlights unlexed data
    with the `HtmlLexer`.

    z
HTML+Velocityz
html+velocity�*.htmlr�ztext/html+velocityc�R��t��jttfi|��dS�N)�superrnrrT�rorp�	__class__s  �rqrnzVelocityHtmlLexer.__init__*�*���������M�=�=�W�=�=�=�=�=rr)
r�r�r�r�r�r��alias_filenamesr�rn�
__classcell__�r�s@rqrUrUsc����������D���G���+�O�%�&�I�>�>�>�>�>�>�>�>�>rrrUc�@��eZdZdZdZdgZddgZdgZ�fd�Zd�Z	�xZ
S)	rVz`
    Subclass of the `VelocityLexer` that highlights unlexed data
    with the `XmlLexer`.

    zXML+Velocityzxml+velocity�*.xmlr�zapplication/xml+velocityc�R��t��jttfi|��dSr�)r�rnrrTr�s  �rqrnzVelocityXmlLexer.__init__:s*���������=�<�<�G�<�<�<�<�<rrc�h�t�|��dz
}t|��r|dz
}|S�Nr�r�)rTr�r%r�s  rqr�zVelocityXmlLexer.analyse_text=s8��
�
'�
'��
-�
-��
4���$���	��#�I�B��	rr�r�r�r�r�r�r�r�r�rnr�r�r�s@rqrVrV.sr����������D���G���'�O�+�,�I�=�=�=�=�=�������rrrVc���eZdZdZdZddgZddgZejej	zZ
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#�Zd$S)%r4a
    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�c��d}tjd|���|dz
}tjd|���|dz
}tjd|���|dz
}|S)Nr�z\{%\s*(block|extends)r�z\{%\s*if\s*.*?%\}皙�����?z\{\{.*?\}\}r�r�s  rqr�zDjangoLexer.analyse_text�s_��
��
�9�-�t�4�4�@��#�I�B�
�9�)�4�0�0�<��#�I�B�
�9�^�T�*�*�6��#�I�B��	rrN)r�r�r�r�r�r�r�r�r��Sr�r"rr~rrrrr�r�Pseudo�Builtinr�r r�r�r!rrr�r�rkrrrqr4r4DsW���������D���!�G�2�4I�J�I��D�2�4�K�E��u��
�g�o�u�-�
�7�#�5�
�X�g�o�t�W�d�G�O��w���g�t��o�'�'�
(�1�
�X�g�o�t�W�d�G�O��G�O�T�7�D��o�'�'�
(�8�
�X�g�o�t�W�d�D�M�
J�
J�
�
�+�
�X�g�o�t�W�
5�
5�w�
@�
�E�N�/
�4(�
�X�h��d�m�
4�
4�
6�
3�
�X�g�t�W�d�D�M�
B�
B�
D�
5�w�~�F�G�
�
�-�d�l�;�
���/�
�t�}�%�
*�F�M�:�
*�F�M�:�
0�(�;�'�(.�
0�
�&�T�N�
�H�H�T�7�?�;�;�V�D��G�J���
��T�N�
�8�8�D�'�/�:�:�F�C��G�J���
�;��	
�c7�7�F�r����rrr4c�8�eZdZdZdZdZdgZddgZdgZdd	e	fd
e
eje	ej
ejee��ej��fde
ejej
ejee��ej��fde
ejej
ee��ej��fd
e
ejej
ee��ej��fdejfde
ejee��ej��fdefde
ejee��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
    �Myghtyzhttp://www.myghty.org/�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�r�rrr�Tagr�rrr	rr"rr�rkrrrqr>r>�s����������D�
"�C��j�G��.�)�I�'�(�I�	�
�T�N�
C�
�X�d�h��d�m�T�X��e�D�k�k�4�8�-�-�
.�4�
�X�d�h��
�t�x��e�K�(�(�$�(�4�4�
5�)�
�X�d�h��
�u�u�[�/A�/A�4�8�
L�
L�
N�
*�
�X�d�h��
�u�u�[�/A�/A�4�8�
L�
L�
N�
�d�h��
#�
�X�d�h���k� 2� 2�D�H�
=�
=�
?�
$�g�.�
(�
�X�d�h���k� 2� 2�E�
:�
:�
<�	� �x��x�0�0�	
2�%
��F�F�Frrr>c�2��eZdZdZdZdgZdgZ�fd�Z�xZS)r?zy
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `HtmlLexer`.

    .. versionadded:: 0.6
    zHTML+Myghtyzhtml+myghtyztext/html+myghtyc�R��t��jttfi|��dSr�)r�rnrr>r�s  �rqrnzMyghtyHtmlLexer.__init__��*���������K�;�;�7�;�;�;�;�;rr�	r�r�r�r�r�r�r�rnr�r�s@rqr?r?�sX����������D��o�G�#�$�I�<�<�<�<�<�<�<�<�<rrr?c�2��eZdZdZdZdgZdgZ�fd�Z�xZS)r@zx
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `XmlLexer`.

    .. versionadded:: 0.6
    z
XML+Myghtyz
xml+myghtyzapplication/xml+myghtyc�R��t��jttfi|��dSr�)r�rnrr>r�s  �rqrnzMyghtyXmlLexer.__init__��*���������;�:�:�'�:�:�:�:�:rrr�r�s@rqr@r@�sX����������D��n�G�)�*�I�;�;�;�;�;�;�;�;�;rrr@c�6��eZdZdZdZddgZgd�Z�fd�Z�xZS)rBz
    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+mygthyc�R��t��jttfi|��dSr�)r�rnrr>r�s  �rqrnzMyghtyJavascriptLexer.__init__��*���������+�A�A��A�A�A�A�Arrr�r�s@rqrBrB�sm����������D�"�K�0�G�+�+�+�I�B�B�B�B�B�B�B�B�BrrrBc�2��eZdZdZdZdgZdgZ�fd�Z�xZS)rAzx
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `CssLexer`.

    .. versionadded:: 0.6
    z
CSS+Myghtyz
css+myghtyztext/css+myghtyc�R��t��jttfi|��dSr�)r�rnrr>r�s  �rqrnzMyghtyCssLexer.__init__rrrr�r�s@rqrArA�sX����������D��n�G�"�#�I�;�;�;�;�;�;�;�;�;rrrAc�x�eZdZdZdZdZdgZgd�ZdgZdde	fd	e
eje
jej��fd
e
eje	ejejee��ej��fde
ejdddee��ej��fd
e
ejejee��ej��fde
ejejee��ej��fdejfde
ejee��ej��fde
fde
ejee��e��fde
ee��e��fgiZd�ZdS)rCz�
    Generic mason templates lexer. Stolen from Myghty lexer. Code that isn't
    Mason markup is HTML.

    .. versionadded:: 1.4
    �Masonzhttp://www.masonhq.com/�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�c�~�d}tjd|���d}n"tjd|tj���d}|S)Nr�z</%(class|doc|init)>g�?z<&.+&>g)\��(�?r�)r��results  rqr�zMasonLexer.analyse_text6sA����
�9�,�d�3�3�?��F�F�
�Y�y�$��	�
2�
2�
>��F��
rr)r�r�r�r�r�r�r�r�r�rrrr�r�	Multiliner�rrr
r"rrr�r�rkrrrqrCrCs����������D�
#�C��i�G�M�M�M�I�&�'�I�	�
�Z� �
*�
�X�d�h�� 1�4�8�
<�
<�
>�
C�
�X�d�h�
�D�M�4�8��e�D�k�k�4�8�-�-�
.�6�
�X�d�h��d�D�%�%�	�2B�2B�D�H�
M�
M�
O�
,�
�X�d�h��
�u�u�Y�/?�/?���
J�
J�
L�
*�
�X�d�h��
�u�u�Y�/?�/?���
J�
J�
L�
�d�h��
#�
�X�d�h���i� 0� 0�$�(�
;�
;�
=�
$�g�.�
(�
�X�d�h���i� 0� 0�%�
8�
8�
:�	� �x���i� 0� 0�(�;�;�	
=�'
��F�B����rrrCc��eZdZdZdZdZdgZdgZdgZde	e
jej
ee��fde	e
jej
ee��e��fd	e	e
jeje
j��fd
ejfde	ej
ej��dfd
e	ej
ejej
��fdej
dfde	ej
ee��ej
��fde	ej
ee��ej
��fde	ee��fde
fgdej
fdejfed��gde	eje
e��fdej
dfde
fgdedfdedfdedfgd�ZdS)rDz
    Generic mako templates lexer. Code that isn't Mako
    markup is yielded as `Token.Other`.

    .. versionadded:: 0.7
    �Makozhttp://www.makotemplates.org/�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.:]+)r�z(</%)([\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�rwz'(?<=<%)(include|inherit|namespace|page)z((?:\w+)\s*=)(\s*)(".*?")�/?\s*>r��".*?"�'.*?'�[^\s>]+)r�rr��attrN)r�r�r�r�r�r�r�r�r�rrrrr~rr"rr	r�rrr�rrr�r r�rkrrrqrDrD?s���������D�
)�C��h�G��	�I�%�&�I�/�
�X�d�o�w����
G�
G�
I�
'�
�X�d�o�w����k�8J�8J�E�
R�
R�
T�
&�
�X�d�o�w�~�t��
G�
G�
I�
$�g�&7�8�
�
�X�g�o�t�|�
4�
4�e�
=�
!�
�X�g�o�t�|�W�_�
E�
E�
G�
���+�>�
'�
�X�g�o�u�u�[�'9�'9�7�?�
K�
K�
M�
�
�X�g�o�u�u�[�'9�'9�7�?�
K�
K�
M�
���%��*�*�

,��T�N�? 
�D�G�O�$�
7���F��G�E�N�N�
�*�
�X�d�n�d�F�
3�
3�
5�
����0�
�T�N�	
��f�f�%�
�f�f�%�
���(�
�[2�2�F�F�FrrrDc�2��eZdZdZdZdgZdgZ�fd�Z�xZS)rEzw
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `HtmlLexer`.

    .. versionadded:: 0.7
    z	HTML+Makoz	html+makoztext/html+makoc�R��t��jttfi|��dSr�)r�rnrrDr�s  �rqrnzMakoHtmlLexer.__init__��*���������I�9�9��9�9�9�9�9rrr�r�s@rqrErE�sX����������D��m�G�!�"�I�:�:�:�:�:�:�:�:�:rrrEc�2��eZdZdZdZdgZdgZ�fd�Z�xZS)rFzv
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `XmlLexer`.

    .. versionadded:: 0.7
    zXML+Makozxml+makozapplication/xml+makoc�R��t��jttfi|��dSr�)r�rnrrDr�s  �rqrnzMakoXmlLexer.__init__��*���������9�8�8��8�8�8�8�8rrr�r�s@rqrFrF�sX����������D��l�G�'�(�I�9�9�9�9�9�9�9�9�9rrrFc�6��eZdZdZdZddgZgd�Z�fd�Z�xZS)rGz}
    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+makoc�R��t��jttfi|��dSr�)r�rnrrDr�s  �rqrnzMakoJavascriptLexer.__init__�s*���������)�?�?�w�?�?�?�?�?rrr�r�s@rqrGrG�sm����������D� �)�,�G�)�)�)�I�@�@�@�@�@�@�@�@�@rrrGc�2��eZdZdZdZdgZdgZ�fd�Z�xZS)rHzv
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `CssLexer`.

    .. versionadded:: 0.7
    zCSS+Makozcss+makoz
text/css+makoc�R��t��jttfi|��dSr�)r�rnrrDr�s  �rqrnzMakoCssLexer.__init__�rrrr�r�s@rqrHrH�sX����������D��l�G� �!�I�9�9�9�9�9�9�9�9�9rrrHc��eZdZdZd�ZdS)�CheetahPythonLexerzI
    Lexer for handling Cheetah's special $ tokens in Python syntax.
    c#�K�tdi|j��}|�|��D]/\}}}|tjkr|dkrt
j}|||fV��0dS)N�$rk)r	rprr#rrr~)ror��pylexer�pos�type_�values      rqrz)CheetahPythonLexer.get_tokens_unprocessed�s{�����-�-���-�-��!(�!?�!?��!E�!E�	$�	$��C������#�#���������u�e�#�#�#�#�#�	$�	$rrN)r�r�r�r�rrkrrrqr$r$�s-��������$�$�$�$�$rrr$c�>�eZdZdZdZdZddgZddgZdd	gZd
de	e
��fde
fd
e
jfde
jfde	e
jee
��e
j��fde	e
jee
����fde	e
jee
��e
j��fdefdefg	iZdS)rJz�
    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.

    .. _spitfire templates: http://code.google.com/p/spitfire/
    �Cheetahzhttp://www.cheetahtemplate.org/�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�r�rrr~rr$r"rr�rkrrrqrJrJ�s���������D�
+�C��*�%�G��7�#�I�(�*B�C�I�	�
��h�w���
"�
 �'�*�
"�G�O�4�
���)�
*��h�w����.@�(A�(A���(�(�
*�(�
�X�g�o�u�u�-?�'@�'@�
A�
A�
C�
%�
�X�g�o�u�u�-?�'@�'@��o�'�'�
(���
��T�N�/
��F�F�FrrrJc�6��eZdZdZdZgd�ZddgZ�fd�Z�xZS)rKz_
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `HtmlLexer`.
    zHTML+Cheetah)zhtml+cheetahz
html+spitfire�htmlcheetahztext/html+cheetahztext/html+spitfirec�R��t��jttfi|��dSr�)r�rnrrJr�s  �rqrnzCheetahHtmlLexer.__init__	s*���������L�<�<�G�<�<�<�<�<rrr�r�s@rqrKrK�s_���������
�D�>�>�>�G�$�&:�;�I�=�=�=�=�=�=�=�=�=rrrKc�6��eZdZdZdZddgZddgZ�fd�Z�xZS)rLz^
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `XmlLexer`.
    zXML+Cheetahzxml+cheetahzxml+spitfirezapplication/xml+cheetahzapplication/xml+spitfirec�R��t��jttfi|��dSr�)r�rnrrJr�s  �rqrnzCheetahXmlLexer.__init__�*���������<�;�;�7�;�;�;�;�;rrr�r�s@rqrLrL
s^���������
�D��n�-�G�*�,F�G�I�<�<�<�<�<�<�<�<�<rrrLc�6��eZdZdZdZgd�Zgd�Z�fd�Z�xZS)rMze
    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+spitfirec�R��t��jttfi|��dSr�)r�rnrrJr�s  �rqrnzCheetahJavascriptLexer.__init__+s*���������,�B�B�'�B�B�B�B�Brrr�r�s@rqrMrMst���������
 �D�5�5�5�G�-�-�-�I�C�C�C�C�C�C�C�C�CrrrMc�^�eZdZdZdZdZdgZddgZdefde	e
e��fd	e	e
ej��d
fe
d��defgd
e
dfdee��dfde	ee
ee����dfdedfde	ee
e��dfgde	ejee��ej��fdejfgd�ZdS)r;z8
    A lexer that highlights genshi text templates.
    zGenshi Textzhttp://genshi.edgewall.org/�
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�r9r�N)r�r�r�r�r�r�r�r�r"rrrr~rrr	rrr�r�rkrrrqr;r;/s:���������D�
'�C��n�G�,�o�>�I��%� �
�x�x��g�6�6�7�
�8�8�D�'�/�:�:�K�H��G�J���
���
��D�&�!�
#�U�U�;�%7�%7��@�
0�
�X�g�t�U�U�;�%7�%7�
8�
8�&�
B�
$�g�v�6�
&����$��(H�(H�&�Q�

�'�
�X�g�o�u�u�[�'9�'9�7�?�
K�
K�
M�
,�
�]�
�
�!��F�F�Frrr;c�Z�eZdZdZejZdefdee	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:.]+r�r�z[<$]r�z[\w:-]+\s*=�pyattrrr�z(")(.*?)(")z(')(.*?)(')rz
py:[\w-]+\s*=r�"�attr-dstring�'�attr-sstringz[^\s>]*�stringsz[^"'$]+r:z(?<!\$)(\$)([a-zA-Z_][\w\.]*))	r�r=r>r�rr@rBrCr�N)r�r�r�r�r�r�r�r"rrr~rr	rr�rrr�r r�r�rkrrrqr<r<Rs��������

�I�E����
%�
�X�g�o�u�u�[�'9�'9�7�?�
K�
K�
M�8��?�
#�T�X�w�7�
"�D�H�e�4��G�J���
�e��

��T�N�
�T�^�X�6�
���&�)�
��H�H�V�U�U�;�-?�-?��H�H�&�Q�
�H�H�V�U�U�;�-?�-?��H�H�&�Q�
���(�
��T�N�
�t�~�x�8�
�T�^�V�4�
���&�)�	
��&�.�)�
�&�.�)�
���(�
��&�&�!��G�I���
�&�M�
��&�&�!��G�I���
�&�M�
��� ��G�J���
�
'�
�X�g�o�u�u�[�'9�'9�7�?�
K�
K�
M�
-�
�]�
�
�_5�5�F�F�Frrr<c�B��eZdZdZdZddgZgd�ZdgZ�fd�Zd�Z	�xZ
S)	r:z�
    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+genshic�R��t��jttfi|��dSr�)r�rnrr<r�s  �rqrnzHtmlGenshiLexer.__init__�s+���������$5�A�A��A�A�A�A�Arrc��d}tjd|���|dz
}tjd|���|dz
}|tj|��zdz
S�Nr�z	\$\{.*?\}皙�����?zpy:(.*?)=["\']r�)r�r�rr�r�s  rqr�zHtmlGenshiLexer.analyse_text�sY��
��
�9�\�4�(�(�4��#�I�B�
�9�&��-�-�9��#�I�B��I�*�4�0�0�0�4�7�7rrr�r�s@rqr:r:�sz���������
�D��j�)�G�4�4�4�O�#�$�I�B�B�B�B�B�8�8�8�8�8�8�8rrr:c�H��eZdZdZdZgd�ZdgZdgZddgZ�fd�Z	d	�Z
�xZS)
r9z�
    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-kidc�R��t��jttfi|��dSr�)r�rnrr<r�s  �rqrnzGenshiLexer.__init__�s+���������#4�@�@��@�@�@�@�@rrc��d}tjd|���|dz
}tjd|���|dz
}|tj|��zdz
SrJ)r�r�rr�r�s  rqr�zGenshiLexer.analyse_text�sY��
��
�9�\�4�(�(�4��#�I�B�
�9�&��-�-�9��#�I�B��H�)�$�/�/�/�$�6�6rr�r�r�r�r�r�r�r�r�r�rnr�r�r�s@rqr9r9�s����������
�D�8�8�8�G��	�I��i�O�'�)<�=�I�A�A�A�A�A�7�7�7�7�7�7�7rrr9c�B��eZdZdZdZgd�ZdgZgd�Z�fd�Zd�Z	�xZ
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+genshic�R��t��jttfi|��dSr�)r�rnrr;r�s  �rqrnzJavascriptGenshiLexer.__init__�s*���������/�E�E�W�E�E�E�E�Errc�<�t�|��dz
S�N皙�����?�r9r�r�s rqr�z"JavascriptGenshiLexer.analyse_text�����'�'��-�-��4�4rrr�r�s@rqr=r=�s����������$�D�$�$�$�G��h�O�+�+�+�I�F�F�F�F�F�5�5�5�5�5�5�5rrr=c�@��eZdZdZdZddgZdgZdgZ�fd�Zd�Z	�xZ
S)	r<zK
    A lexer that highlights CSS definitions in genshi text templates.
    zCSS+Genshi Textzcss+genshitextz
css+genshi�*.cssztext/css+genshic�R��t��jttfi|��dSr�)r�rnrr;r�s  �rqrnzCssGenshiLexer.__init__�s*���������?�>�>�g�>�>�>�>�>rrc�<�t�|��dz
SrWrYr�s rqr�zCssGenshiLexer.analyse_text�rZrrr�r�s@rqr<r<�sq����������D���.�G��i�O�"�#�I�?�?�?�?�?�5�5�5�5�5�5�5rrr<c�H��eZdZdZdZgd�ZdgZgd�ZdgZ�fd�Z	d�Z
�xZS)	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*.rhtmlrEztext/html+rubyc�R��t��jttfi|��dSr�)r�rnrr*r�s  �rqrnzRhtmlLexer.__init__��*���������H�8�8��8�8�8�8�8rrc�h�t�|��dz
}t|��r|dz
}|S�Nr�g�?)r*r�r$r�s  rqr�zRhtmlLexer.analyse_text�s8��
�
"�
"�4�
(�
(�4�
/����%�%�	��#�I�B��	rrrRr�s@rqr+r+�s}����������D�0�0�0�G���I�4�4�4�O�!�"�I�9�9�9�9�9�������rrr+c�@��eZdZdZdZddgZdgZdgZ�fd�Zd�Z	�xZ
S)	r,zo
    Subclass of `ErbLexer` which highlights data outside preprocessor
    directives with the `XmlLexer`.
    zXML+Rubyzxml+rubyzxml+erbr�zapplication/xml+rubyc�R��t��jttfi|��dSr�)r�rnrr*r�s  �rqrnzXmlErbLexer.__init__
�*���������8�7�7�w�7�7�7�7�7rrc�h�t�|��dz
}t|��r|dz
}|Sr�)r*r�r%r�s  rqr�zXmlErbLexer.analyse_text
s8��
�
"�
"�4�
(�
(�4�
/���$���	��#�I�B��	rrr�r�s@rqr,r,�sq���������
�D��9�%�G��i�O�'�(�I�8�8�8�8�8�������rrr,c�@��eZdZdZdZddgZdgZdgZ�fd�Zd�Z	�xZ
S)	r-zS
    Subclass of `ErbLexer` which highlights unlexed data with the `CssLexer`.
    zCSS+Rubyzcss+rubyzcss+erbr\z
text/css+rubyc�R��t��jttfi|��dSr�)r�rnrr*r�s  �rqrnzCssErbLexer.__init__rhrrc�<�t�|��dz
SrW�r*r�r�s rqr�zCssErbLexer.analyse_text!����$�$�T�*�*�T�1�1rrr�r�s@rqr-r-sq����������D��9�%�G��i�O� �!�I�8�8�8�8�8�2�2�2�2�2�2�2rrr-c�B��eZdZdZdZgd�ZdgZgd�Z�fd�Zd�Z	�xZ
S)r.z^
    Subclass of `ErbLexer` which highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Ruby)zjavascript+rubyzjs+rubyzjavascript+erbzjs+erbrT)zapplication/x-javascript+rubyztext/x-javascript+rubyztext/javascript+rubyc�R��t��jttfi|��dSr�)r�rnrr*r�s  �rqrnzJavascriptErbLexer.__init__2�*���������(�>�>�g�>�>�>�>�>rrc�<�t�|��dz
SrWrmr�s rqr�zJavascriptErbLexer.analyse_text5rnrrr�r�s@rqr.r.%s{���������
�D�H�H�H�G��h�O�)�)�)�I�?�?�?�?�?�2�2�2�2�2�2�2rrr.c�H��eZdZdZdZdgZdgZgd�Zgd�Z�fd�Z	d�Z
�xZS)	r&z�
    Subclass of `PhpLexer` that highlights unhandled data with the `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+PHPzhtml+phpz*.phtml)�*.phpr�rFrG�
*.php[345])zapplication/x-phpzapplication/x-httpd-phpzapplication/x-httpd-php3zapplication/x-httpd-php4zapplication/x-httpd-php5c�R��t��jttfi|��dSr�)r�rnrrr�s  �rqrnzHtmlPhpLexer.__init__Ircrrc�\�tj|��dz
}t|��r|dz
}|Sre)rr�r$r�s  rqr�zHtmlPhpLexer.analyse_textLs5��
�
"�4�
(�
(�4�
/����%�%�	��#�I�B��	rrrRr�s@rqr&r&9s�����������D��l�G���I�%�%�%�O�I�I�I�I�9�9�9�9�9�������rrr&c�@��eZdZdZdZdgZgd�ZdgZ�fd�Zd�Z	�xZ
S)r'zT
    Subclass of `PhpLexer` that highlights unhandled data with the `XmlLexer`.
    zXML+PHPzxml+php)r�rtruzapplication/xml+phpc�R��t��jttfi|��dSr�)r�rnrrr�s  �rqrnzXmlPhpLexer.__init__]rhrrc�\�tj|��dz
}t|��r|dz
}|Sr�)rr�r%r�s  rqr�zXmlPhpLexer.analyse_text`s5��
�
"�4�
(�
(�4�
/���$���	��#�I�B��	rrr�r�s@rqr'r'Ssr����������D��k�G�6�6�6�O�&�'�I�8�8�8�8�8�������rrr'c�>��eZdZdZdZdgZdgZdgZ�fd�Zd�Z	�xZ
S)r(zU
    Subclass of `PhpLexer` which highlights unmatched data with the `CssLexer`.
    zCSS+PHPzcss+phpr\ztext/css+phpc�R��t��jttfi|��dSr�)r�rnrrr�s  �rqrnzCssPhpLexer.__init__qrhrrc�0�tj|��dz
SrW�rr�r�s rqr�zCssPhpLexer.analyse_textts���$�T�*�*�T�1�1rrr�r�s@rqr(r(gsn����������D��k�G��i�O�� �I�8�8�8�8�8�2�2�2�2�2�2�2rrr(c�B��eZdZdZdZddgZdgZgd�Z�fd�Zd�Z	�xZ
S)	r)z`
    Subclass of `PhpLexer` which highlights unmatched data with the
    `JavascriptLexer`.
    zJavaScript+PHPzjavascript+phpzjs+phprT)zapplication/x-javascript+phpztext/x-javascript+phpztext/javascript+phpc�R��t��jttfi|��dSr�)r�rnrrr�s  �rqrnzJavascriptPhpLexer.__init__�rqrrc�*�tj|��Sr�r~r�s rqr�zJavascriptPhpLexer.analyse_text�s���$�T�*�*�*rrr�r�s@rqr)r)xsz���������
�D���*�G��h�O�(�(�(�I�?�?�?�?�?�+�+�+�+�+�+�+rrr)c�@��eZdZdZdZdgZgd�ZdgZ�fd�Zd�Z	�xZ
S)r0z�
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+Smartyzhtml+smarty)r�rFrGr�ztext/html+smartyc�R��t��jttfi|��dSr�)r�rnrr/r�s  �rqrnzHtmlSmartyLexer.__init__�r�rrc�h�t�|��dz
}t|��r|dz
}|Sre)r/r�r$r�s  rqr�zHtmlSmartyLexer.analyse_text��8��
�
%�
%�d�
+�
+�d�
2����%�%�	��#�I�B��	rrr�r�s@rqr0r0�sr����������D��o�G�=�=�=�O�#�$�I�<�<�<�<�<�������rrr0c�@��eZdZdZdZdgZddgZdgZ�fd�Zd�Z	�xZ
S)	r1z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `XmlLexer`.
    z
XML+Smartyz
xml+smartyr�r�zapplication/xml+smartyc�R��t��jttfi|��dSr�)r�rnrr/r�s  �rqrnzXmlSmartyLexer.__init__�rrrc�h�t�|��dz
}t|��r|dz
}|Sr�)r/r�r%r�s  rqr�zXmlSmartyLexer.analyse_text��8��
�
%�
%�d�
+�
+�d�
2���$���	��#�I�B��	rrr�r�s@rqr1r1�sq���������
�D��n�G���(�O�)�*�I�;�;�;�;�;�������rrr1c�@��eZdZdZdZdgZddgZdgZ�fd�Zd�Z	�xZ
S)	r2z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `CssLexer`.
    z
CSS+Smartyz
css+smartyr\r�ztext/css+smartyc�R��t��jttfi|��dSr�)r�rnrr/r�s  �rqrnzCssSmartyLexer.__init__�rrrc�<�t�|��dz
SrW�r/r�r�s rqr�zCssSmartyLexer.analyse_text�rZrrr�r�s@rqr2r2�sq���������
�D��n�G���(�O�"�#�I�;�;�;�;�;�5�5�5�5�5�5�5rrr2c�D��eZdZdZdZddgZddgZgd�Z�fd�Zd	�Z	�xZ
S)
r3zd
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Smartyzjavascript+smartyz	js+smartyrTr�)zapplication/x-javascript+smartyztext/x-javascript+smartyztext/javascript+smartyc�R��t��jttfi|��dSr�)r�rnrr/r�s  �rqrnzJavascriptSmartyLexer.__init__�rrrc�<�t�|��dz
SrWr�r�s rqr�z"JavascriptSmartyLexer.analyse_text�rZrrr�r�s@rqr3r3�s����������
�D�"�K�0�G��w�'�O�+�+�+�I�B�B�B�B�B�5�5�5�5�5�5�5rrr3c�L��eZdZdZdZgd�Zgd�Zgd�ZddgZ�fd�Z	d	�Z
�xZS)
r5z�
    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�
htmldjango)z	*.html.j2z*.htm.j2z
*.xhtml.j2z
*.html.jinja2z*.htm.jinja2z*.xhtml.jinja2rEztext/html+djangoztext/html+jinjac�R��t��jttfi|��dSr�)r�rnrr4r�s  �rqrnzHtmlDjangoLexer.__init__�r�rrc�h�t�|��dz
}t|��r|dz
}|Sre)r4r�r$r�s  rqr�zHtmlDjangoLexer.analyse_text�r�rrrRr�s@rqr5r5�s�����������D�9�9�9�G�j�j�j�I�4�4�4�O�#�%6�7�I�<�<�<�<�<�������rrr5c�J��eZdZdZdZddgZddgZdgZdd	gZ�fd
�Z	d�Z
�xZS)r7z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `XmlLexer`.
    zXML+Django/Jinjaz
xml+djangoz	xml+jinjaz*.xml.j2z*.xml.jinja2r�zapplication/xml+djangozapplication/xml+jinjac�R��t��jttfi|��dSr�)r�rnrr4r�s  �rqrnzXmlDjangoLexer.__init__rrrc�h�t�|��dz
}t|��r|dz
}|Sr�)r4r�r%r�s  rqr�zXmlDjangoLexer.analyse_textr�rrrRr�s@rqr7r7�s~���������
�D��[�)�G��^�,�I��i�O�)�+B�C�I�;�;�;�;�;�������rrr7c�J��eZdZdZdZddgZddgZdgZdd	gZ�fd
�Z	d�Z
�xZS)r6z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `CssLexer`.
    zCSS+Django/Jinjaz
css+djangoz	css+jinjaz*.css.j2z*.css.jinja2r\ztext/css+djangoztext/css+jinjac�R��t��jttfi|��dSr�)r�rnrr4r�s  �rqrnzCssDjangoLexer.__init__rrrc�<�t�|��dz
SrW�r4r�r�s rqr�zCssDjangoLexer.analyse_textrZrrrRr�s@rqr6r6s~���������
�D��[�)�G��^�,�I��i�O�"�$4�5�I�;�;�;�;�;�5�5�5�5�5�5�5rrr6c�J��eZdZdZdZgd�ZddgZdgZgd�Z�fd�Z	d	�Z
�xZS)
r8zd
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Django/Jinja)zjavascript+djangoz	js+djangozjavascript+jinjazjs+jinjaz*.js.j2z*.js.jinja2rT)zapplication/x-javascript+djangozapplication/x-javascript+jinjaztext/x-javascript+djangoztext/x-javascript+jinjaztext/javascript+djangoztext/javascript+jinjac�R��t��jttfi|��dSr�)r�rnrr4r�s  �rqrnzJavascriptDjangoLexer.__init__1rrrc�<�t�|��dz
SrWr�r�s rqr�z"JavascriptDjangoLexer.analyse_text4rZrrrRr�s@rqr8r8s����������
%�D�/�/�/�G��M�*�I��h�O�*�*�*�I�B�B�B�B�B�5�5�5�5�5�5�5rrr8c�V�eZdZdZdedfdefdefdefgdedfd	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).*?>�[^<]+�<rxr��[\w\W]+?(?=%>|\Z)�r�r�N)	r�r�r�r�rr"rrr�rkrrrqr�r�8sr���������w��&�
S�
�
�
�u��
�5�M�

��G�V�$�
!�5�5��#3�#3�4�
���F�F�Frrr�c�>��eZdZdZdZdgZdgZdgZ�fd�Zd�Z	�xZ
S)rIzA
    Lexer for Java Server Pages.

    .. versionadded:: 0.7
    zJava Server Page�jspz*.jspzapplication/x-jspc�R��t��jttfi|��dSr��r�rnrr�r�s  �rqrnzJspLexer.__init__\r4rrc�v�tj|��dz
}t|��r|dz
}d|vr	d|vr|dz
}|S�Nr�r�rwrxr�)rr�r%r�s  rqr�zJspLexer.analyse_text_sO��
�
#�D�
)�
)�D�
0���$���	��#�I�B��4�<�<�D�D�L�L��#�I�B��	rr�r�r�r�r�r�r�r�r�rnr�r�r�s@rqrIrIQsn���������
�D��g�G��	�I�$�%�I�<�<�<�<�<�������rrrIc���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�Zd�ZdS)rNzR
    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�r�c��d|vrdSdS)z.Evoque templates use $evoque, which is unique.z$evoquertNrkr�s rqr�zEvoqueLexer.analyse_text�s�������1��rr)r�r�r�r�r�r�r�r�r�r�r�r"rrrrrr�r rr	r�r�rkrrrqrNrNhs���������
�D��j�G���I�'�(�I��I�E����
�W�&�	�2�
�e��
��!2�3�
7�
�X�k�4�<��d��k�+�+�
,�!�
�X�k�4�<��d��e�e�K�0�0�+�?�?�
@�
2�
�X�k�4�<��d��e�K�(�(�+�7�7�
8�"�8�8�K���#F�#F�G�
5�
�X�k�4���{�);�);��l�D�$��=�=�
>��5�M�9
�>��)�*�
�W�&��0�
�W�&��/�
�w�(�)�	
�?%�%�F�N����rrrNc�>��eZdZdZdZdgZdgZdgZ�fd�Zd�Z	�xZ
S)rOzy
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 1.1
    zHTML+Evoquezhtml+evoquer�ztext/html+evoquec�R��t��jttfi|��dSr�)r�rnrrNr�s  �rqrnzEvoqueHtmlLexer.__init__�r�rrc�6�t�|��Sr��rNr�r�s rqr�zEvoqueHtmlLexer.analyse_text�����'�'��-�-�-rrr�r�s@rqrOrO�sn����������D��o�G��
�I�#�$�I�<�<�<�<�<�.�.�.�.�.�.�.rrrOc�>��eZdZdZdZdgZdgZdgZ�fd�Zd�Z	�xZ
S)rPzx
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `XmlLexer`.

    .. versionadded:: 1.1
    z
XML+Evoquez
xml+evoquer�zapplication/xml+evoquec�R��t��jttfi|��dSr�)r�rnrrNr�s  �rqrnzEvoqueXmlLexer.__init__�rrrc�6�t�|��Sr�r�r�s rqr�zEvoqueXmlLexer.analyse_text�r�rrr�r�s@rqrPrP�sn����������D��n�G��	�I�)�*�I�;�;�;�;�;�.�.�.�.�.�.�.rrrPc�h�eZdZdZdZdgZgZgZej	Z
dejfdej
fdefdefdefd	efd
efdefdefd
ejdfdejfdefdefdejfdejfdeejee��fdejfdefdefgdejfdejfdejfdejfd
ejdfgd�ZdS)rQz
    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[^"#]+r�r�)r�r�N)r�r�r�r�r�r�r�r�r��
IGNORECASEr�rr�rrr r�r!rr�rrr�rrr��Interpr�rkrrrqrQrQ�sO���������D��g�G��I��I��M�E����(�
 �'�"3�4�
��"�
�H�%�
�h�'�
�x� �
2�H�=�
��"�
�H��
�6�=�(�+��v�}�%�
�V��M�NU�
W�$�W�%5�6�
T�
�]�
�
(�
�X�d�m�T�;�
7�
7�
9�
�t�}�-�
 �+�.�
�T�N�3
�8�F�M�"�
�v�}�%�
��
�&�
�6�=�!�
�6�=�&�)�
�9#�#�F�F�FrrrQc��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)<[^<>]*r�r�z--->z([^<-]|<(?!!---)|-(?!-->))+)r�r�r�r�N)r�r�r�r�r�r�r�r�r"rrrrr�rrrQrr�rkrrrqr�r��se���������D��f�G��I��I��u���G�F�O�O�
���
��w�(�+�6�
��(�
�t�|�Z�8�
8�
�X�d�l�E�E�/�$:�$:�D�L�
I�
I�
K�Q��X�d�l�E�E�/�$:�$:�D�L�
I�
I�	
K�
����
�X�X�k�5�5��3I�3I�&1�3�3�
4����f�5��G�F�O�O�
�U�#�
�5�M�	
��w�(�'�2�
�g�'��0�
+�W�->�?�
�;"�"�F�F�Frrr�c�:��eZdZdZdZdgZddgZdgZ�fd�Z�xZ	S)rRz#
    Coldfusion markup in html
    zColdfusion HTML�cfmz*.cfmz*.cfmlzapplication/x-coldfusionc�R��t��jttfi|��dSr�)r�rnrr�r�s  �rqrnzColdfusionHtmlLexer.__init__.s+���������$9�E�E�W�E�E�E�E�Err�
r�r�r�r�r�r�r�r�rnr�r�s@rqrRrR%sk����������D��g�G��(�#�I�+�,�I�F�F�F�F�F�F�F�F�FrrrRc�6��eZdZdZdZdgZdgZgZ�fd�Z�xZ	S)rSzH
    Coldfusion markup/script components

    .. versionadded:: 2.0
    zColdfusion CFC�cfcz*.cfcc�R��t��jttfi|��dSr�)r�rnrRrQr�s  �rqrnzColdfusionCFCLexer.__init__=s+��������,�o�I�I��I�I�I�I�Irrr�r�s@rqrSrS2se���������
�D��g�G��	�I��I�J�J�J�J�J�J�J�J�JrrrSc�>��eZdZdZdZdgZdgZdgZ�fd�Zd�Z	�xZ
S)rWzD
    Lexer for Scalate Server Pages.

    .. versionadded:: 1.4
    zScalate Server Page�sspz*.sspzapplication/x-sspc�R��t��jttfi|��dSr�r�r�s  �rqrnzSspLexer.__init__Lr4rrc��d}tjd|��r|dz
}t|��r|dz
}d|vr	d|vr|dz
}|S)Nr�zval \w+\s*:g333333�?rKrwrxr�)r�r�r%r�s  rqr�zSspLexer.analyse_textOs\��
��
�9�^�T�*�*�	��#�I�B��$���	��#�I�B��4�<�<�D�D�L�L��#�I�B��	rrr�r�s@rqrWrWAsn���������
!�D��g�G��	�I�$�%�I�<�<�<�<�<�������rrrWc�P�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�rxr�r�r�N)	r�r�r�r�rr"rrr�rkrrrqr�r�Zsg���������w��&�
�u��
�5�M�
��G�V�$�
!�5�5��#6�#6�7�
�
��F�F�Frrr�c�>��eZdZdZdZdgZdgZdgZ�fd�Zd�Z	�xZ
S)rXzW
    Lexer for `Tea Templates <http://teatrove.org/>`_.

    .. versionadded:: 1.5
    �Tea�teaz*.teaz
text/x-teac�R��t��jttfi|��dSr�)r�rnrr�r�s  �rqrnzTeaTemplateLexer.__init__{s+���������#7�C�C�7�C�C�C�C�Crrc�v�tj|��dz
}t|��r|dz
}d|vr	d|vr|dz
}|Sr�)rr�r%r�s  rqr�zTeaTemplateLexer.analyse_text~sO��
�
&�t�
,�
,�t�
3���$���	��#�I�B��4�<�<�D�D�L�L��#�I�B��	rrr�r�s@rqrXrXpsr���������
�D��g�G��	�I���I�D�D�D�D�D�������rrrXc�B��eZdZdZdZdgZgd�Zgd�Z�fd�Zd�Z	�xZ
S)rYz�
    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�rFrG�*.lasso�*.lasso[89]�*.incl�*.inc�*.las)ztext/html+lassozapplication/x-httpd-lassozapplication/x-httpd-lasso[89]c�R��t��jttfi|��dSr�)r�rnrrr�s  �rqrnzLassoHtmlLexer.__init__�s*���������J�:�:�'�:�:�:�:�:rrc�\�tj|��dz
}t|��r|dz
}|Sre)rr�r$r�s  rqr�zLassoHtmlLexer.analyse_text�s5��
�
$�T�
*�
*�T�
1����%�%�	��#�I�B��	rrr�r�s@rqrYrY�s�����������D��n�G�3�3�3�O�2�2�2�I�;�;�;�;�;�������rrrYc�@��eZdZdZdZdgZgd�ZdgZ�fd�Zd�Z	�xZ
S)rZzz
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `XmlLexer`.

    .. versionadded:: 1.6
    z	XML+Lassoz	xml+lasso)r�r�r�r�r�r�zapplication/xml+lassoc�R��t��jttfi|��dSr�)r�rnrrr�s  �rqrnzLassoXmlLexer.__init__�s*���������:�9�9��9�9�9�9�9rrc�\�tj|��dz
}t|��r|dz
}|Sr�)rr�r%r�s  rqr�zLassoXmlLexer.analyse_text�s5��
�
$�T�
*�
*�T�
1���$���	��#�I�B��	rrr�r�s@rqrZrZ�sx����������D��m�G�3�3�3�O�(�)�I�:�:�:�:�:�������rrrZc�>��eZdZdZdZdgZdgZdgZ�fd�Zd�Z	�xZ
S)r[zz
    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�rnrrr�s  �rqrnzLassoCssLexer.__init__�s5���'+��#�$�������:�9�9��9�9�9�9�9rrc�z�tj|��dz
}tjd|��r|dz
}d|vr|dz
}|S)NrXz
\w+:[^;]+;r�zpadding:)rr�r�r�r�s  rqr�zLassoCssLexer.analyse_text�sM��
�
$�T�
*�
*�T�
1��
�9�]�D�)�)�	��#�I�B������#�I�B��	rrr�r�s@rqr[r[�sn����������D��m�G��i�O�!�"�I�:�:�:�:�:�������rrr[c�B��eZdZdZdZddgZdgZgd�Z�fd�Zd�Z	�xZ
S)	r\z�
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `JavascriptLexer`.

    .. versionadded:: 1.6
    zJavaScript+Lassozjavascript+lassozjs+lassorT)zapplication/x-javascript+lassoztext/x-javascript+lassoztext/javascript+lassoc�\��d|d<t��jttfi|��dSr�)r�rnrrr�s  �rqrnzLassoJavascriptLexer.__init__�s5���'+��#�$�������*�@�@��@�@�@�@�@rrc�4�tj|��dz
}|SrW)rr�r�s  rqr�z!LassoJavascriptLexer.analyse_text�s��
�
$�T�
*�
*�T�
1���	rrr�r�s@rqr\r\�s����������D�!�:�.�G��h�O�*�*�*�I�A�A�A�A�A�������rrr\c��eZdZdZdZdZdgZdefdefde	ej
e��dfd	e	eje
je
j��dfd
e	eje��dfgdefdej
d
fde	e
ej��d
fde	eje��fde	eee��fde	eeej��fde	eee��dfed��gdefded
fde	eeeje��fde	eeeed�����fdejfed��gdejfdejfdejfged��dejfdejfd e
fgd!�Zd"S)#r]z�
    Generic handlebars template lexer.

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

    .. versionadded:: 2.0
    �
Handlebarszhttps://handlebarsjs.com/�
handlebarsr�z\{\{!.*\}\}z
(\{\{\{)(\s*)r�z(\{\{)([#~/]+)([^\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�r�r�r�r�N)r�r�r�r�r�r�r�r"rr�Specialrr~r!r�rrrr�rrrrr�r r�r�r�rkrrrqr]r]�s+���������D�
%�C��n�G��u���W�%��x�x����>�>��F�(�
�X�g�o�v�'7��9I�
J�
J�E�
S�
�X�X�g�o�t�<�<�e�D�

� �T�N�
����0�
�H�H�V�W�_�=�=�v�F��h�h�t�~�x�@�@�A�)�(�(�7�D�'�*J�*J�K�
"�H�H�W�d�D�M�$J�$J�K�
�h�h�w��k�B�B�
�
 �
�G�I���!
�&�T�N�
�K��(�
+�X�X�g�t�6:�m�T�.K�.K�
L�
"�H�H�W�d�-2�U�4�z�-J�-J�-J�%L�%L�
M�
��
�&��G�I���
�#�D�M�2�
�$�-�(�
-�t�}�=�
�
�G�J���+�F�M�:�
*�F�M�:�'�(.�
0�

�g<�<�F�F�Frrr]c�<��eZdZdZdZdgZddgZddgZ�fd�Z�xZ	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-templatec�R��t��jttfi|��dSr�)r�rnrr]r�s  �rqrnzHandlebarsHtmlLexer.__init__Gs*���������O�?�?�w�?�?�?�?�?rrr�r�s@rqr^r^:so����������D� �!�G���)�I�'�)E�F�I�@�@�@�@�@�@�@�@�@rrr^c�>��eZdZdZdZgd�Zgd�ZddgZ�fd�Z�xZ	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�sls)z*.slsz	*.yaml.j2z*.yml.j2z
*.yaml.jinja2z*.yml.jinja2ztext/x-yaml+jinjaz
text/x-slsc�R��t��jttfi|��dSr�)r�rnr
r4r�s  �rqrnzYamlJinjaLexer.__init__Zr�rrr�r�s@rqr_r_Ksi����������D�+�+�+�G�S�S�S�I�$�l�3�I�<�<�<�<�<�<�<�<�<rrr_c�H�eZdZdZdZdZdgZdgZiddefde	e
e��dfd	e	e
eee
d
�����dfd
efg�ddejdfde	eje��eddd
��fde	ejee
��dfde	ejeee
d���ee
��dfde	ejee
��dfde	ejee
��dfde	ejdee
��dfde	ejdee
��dfde	ejeee
d
���e
e��dfd e	eje��d!fg
�ded��d"e
dfd#e
d$fg�d$ed��d"e
d%fd&e	eje
e��d'fg�d'd#e
dfed(��ed)��g�ded��ed��d*e	ee
d
���eeeee
d
���ee
��fd+efd,ejfd-e	ee
d
���eejeee
d
�����fed
��ed��g�d.ed
��ed/��g�d0d1e	eede��dfd2e	eeje��dfg�d(d"e
dfg�dd3e
d%fg�d/d4edfg�d5ed��d6e	ejee��fd7e	e
eee
d���ee
��fed8��ed9��ed:��d;e
fg�d)ed5��d<efg�d=ed5��ed��d<efg�d!d3e
d%fed)��g�dd3e
d%fed=��g�d:d>ejfg�d?ejfd@e
fgdAejfdBejfgdCejfdDejfged:��ed8��ed9��ed��gdEefgdFe	e
eejee
��d%fd<e fgdefdGe	e
eejee
��dfd
efgdH��Z!dS)Ir`z@
    Lexer for Liquid templates.

    .. versionadded:: 2.0
    �liquidz.https://www.rubydoc.info/github/Shopify/liquidz*.liquidr�r�z
(\{%)(\s*)ztag-or-blockz(\{\{)(\s*)([^\s}]+)r�r��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*)(%\})r�z(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*)(\}\})r��number�keyword�,r�zvariable-param-markupz\b(false|true)\br�z(?<=\w)\.(?=\w)z'[^']*'z"[^"]*"z\d+\.\d+r�z[ \t]+z (\{%)(\s*)(endcomment)(\s*)(%\})z(\{%)(\s*)(endraw)(\s*)(%\}))r�r�rr�rr�r)"r�r�r�r�r�r�r�r�rrrrrrr�Reservedrrr�rr�r�Wordr�r�r�r r�r�r!�Float�Integerrr�rkrrrqr`r`^s��������
�D�
:�C��j�G���I�@��
�t��
�H�H�[�*�=�=�~�N�
$�
�X�k�:�u�u�T�9�/M�/M�/M�
N�
N�
�
��D�M�	
�@�	�
-�w�/?��M�
�X�X�g�&6�
�C�C�
�X�n�l�I�
>�
>�
@�
 �
�X�g�&�
�K�
@�
@�&�
J�2�
�X�d�h�
�E�E�$�
�,K�,K�,K� �+�/�/�06�
8�$�
�X�d�h�
�K�
8�
8�)�
E�
�
�X�d�h�
�K�
8�
8�%�
A�0�
�X�g�&��j�+�
F�
F��
P�
(�
�X�d�h��j�+�
>�
>��
H�3�
�X�d�h�
��e�D�	�2�2�2�K��M�M�
"�
$������:� >� >��M�=
�@�Z	��G�L�!�!�
�k�6�*�
�K��+�	
�[@�h	��G�L�!�!�
�k�#3�4�
#�
�X�d�m�[�*�
=�
=��
P�	
�i@�x	�
�K��(��G�L�!�!��G�*�+�+�
�y@�D	��G�N�#�#��G�L�!�!�
?�
�X�e�e�D�)�4�4�4�j�(� �%�%��i�"@�"@�"@�*�!�#�#�
$��X��
���'�
:�
�X�e�e�D�)�4�4�4�j�(�-� �%�%��i�"@�"@�"@�B�B�
C�
�G�I����G�L�!�!�
�E@�h	��G�I����G�'�(�(�
�i@�r	�
'�
�X�j�(�D�*�
=�
=�v�
G�
(�
�X�j�(�-��
<�
<�f�
F�
�s@�@	�
�k�6�*�
�A@�H	�
�[�"2�3�
�I@�P	�
�Z��(�
�Q@�Z	��G�L�!�!�
$�
�X�d�n�j�(�
;�
;�
=�/�
�X�k�:�u�u�T�:�/N�/N�/N� �+�/�/�
0�
�G�H����G�H����G�I���
�;��
�[@�z	��G�N�#�#�
�4�L�!
�{@�D	 ��G�N�#�#��G�J���
�4�L�"
�E@�P	�
�[�"2�3��G�*�+�+�
�Q@�Z	�
�[�"2�3��G�+�,�,� 
�[@�f	�
 �'�"2�3�
�g@�p�d�m�,�
��-�
����'�
���'�
��&�,�'�
�V�^�$�
�
�G�I����G�H����G�H����G�J���	
��
�#�
�1�
�X�k�:�t�x��!�#�#�$4�
6��7�O�	
��t��
,�
�X�k�:�t�x��!�#�#�$*�
,��D�M�
�s@�@�@�F�F�Frrr`c��eZdZdZdZdgZdgZejej	zZ
dZdZdezdzZ
ee
zZd	efd
ejdfdefd
eejeeeejeejeeeej��fdeejeeeejeejeeeej��fdezeejeeeej��dfdeejee��dfdefgdezeeeej��fdezeeeeeej��fdejfdefdejfeejfdezejfdefdejfdejfdefdefgdefdeeej��d fed!��gdefd"eeej��d fed!��d#e fgd$�Z!d%S)&raz�
    Twig 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)r�r�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�r�N)"r�r�r�r�r�r�r�r�r�r�r��_ident_char�_ident_begin�
_ident_end�_ident_innerr"rr~rrrrr�rr�r�r�r!r r�r�rrr�rkrrrqrara,s|���������D��h�G�%�&�I��D�2�4�K�E�*�K�/�L��+�%��,�J��*�,�L��u��
�g�o�u�-�
�W�%�1�
�X�g�o�t�W�d�G�O��W�_�d�G�T��o�'�'�
(�
6�
�X�g�o�t�W�d�G�O��W�_�d�G�T��o�'�'�
(�/��
=�
�X�g�o�t�W�d�D�M�
J�
J�
�
�+�
�X�g�o�t�W�
5�
5�u�
>�
�E�N�-
�2��
,�
�X�h��d�m�
4�
4�
6�
(�<�
7�
�X�g�t�W�d�D�M�
B�
B�
D�
,�g�n�=�5��	
�
&�t�|�4�
�4�=�)�
�\�
!�4�=�1�
�&�!�
*�F�M�:�
*�F�M�:�
D�h�O�'�(.�
0�%
�,�T�N�
�H�H�T�7�?�;�;�V�D��G�J���
��T�N�
�8�8�D�'�/�:�:�F�C��G�J���
�;��	
�g9�9�F�F�Frrrac�8��eZdZdZdZdgZdgZdgZ�fd�Z�xZ	S)rbzw
    Subclass of the `TwigLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    z	HTML+Twigz	html+twigz*.twigztext/html+twigc�R��t��jttfi|��dSr�)r�rnrrar�s  �rqrnzTwigHtmlLexer.__init__�rrrr�r�s@rqrbrbs_����������D��m�G��
�I�!�"�I�:�:�:�:�:�:�:�:�:rrrbc��eZdZdZdZdZdgZdefdee	j
e��dfdeee
jeeee��d	fd
eee
jee��fdeee
jeee��d	fdeee
je��fgd
efde	j
dfdejfdejfdejfdefde
jfde
jfdeeeeeeeee��fg	dedfdedfdedfgd�ZdS)rca
    Generic angular2 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
    �Angular2z(https://angular.io/guide/template-syntax�ng2z	[^{([*#]+r��ngExpressionz&([([]+)([\w:.-]+)([\])]+)(\s*)(=)(\s*)rz([([]+)([\w:.-]+)([\])]+)(\s*)z([*#])([\w:.-]+)(\s*)(=)(\s*)z([*#])([\w:.-]+)(\s*)z\s+(\|\s+)?rr�z:?(true|false)r�r�r�z[a-zA-Z][\w-]*(\(.*\))?z\.[\w-]+(\(.*\))?z-(\?)(\s*)([^}\s]+)(\s*)(:)(\s*)([^}\s]+)(\s*)rrr)r�rrN)r�r�r�r�r�r�r�r"rrr~rrrr�rr �Booleanr�r�r!r�r�rkrrrqrcrc�s����������D�
4�C��g�G��5�!��X�X�g�o�t�<�<�n�M�7�
�X�k�4�>�;��h�PT�
U�
U�
�
�/�
�X�k�4�>�;��
E�
E�
G�.�
�X�k�4�>�4��4�
H�
H�&�
R�
%�
�X�k�4�>�4�
8�
8�
:�!
�*�T�"�
�g�o�v�.����/�
*�F�M�:�
*�F�M�:�'�(.�
0�(���7�
!�4�=�1�>�
�X�h��f�d�H�d�F�D�
Q�
Q�
S�!
�(�f�f�%�
�f�f�%�
���(�
�Q-�-�F�F�Frrrcc�2��eZdZdZdZdgZdgZ�fd�Z�xZS)rdz{
    Subclass of the `Angular2Lexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    zHTML + Angular2zhtml+ng2z*.ng2c�R��t��jttfi|��dSr�)r�rnrrcr�s  �rqrnzAngular2HtmlLexer.__init__�r�rr)	r�r�r�r�r�r�r�rnr�r�s@rqrdrd�sW����������D��l�G��	�I�>�>�>�>�>�>�>�>�>rrrdc�:��eZdZdZdZdgZgd�Z�fd�Zd�Z�xZ	S)rez:
    Templated SQL lexer.

    .. versionadded:: 2.13
    z	SQL+Jinjaz	sql+jinja)z*.sqlz*.sql.j2z*.sql.jinja2c�R��t��jttfi|��dSr�)r�rnrr4r�s  �rqrnzSqlJinjaLexer.__init__�rrrc��d}tjd|��r|dz
}tjd|��r|dz
}tjd|tj��r|dz
}|S)Nr�z\{\{\s*ref\(.*\)\s*\}\}r�z\{\{\s*source\(.*\)\s*\}\}r�z?\{%-?\s*macro \w+\(.*\)\s*-?%\}\s+.*\s+\{%-?\s*endmacro\s*-?%\}r�)r�r�r�r�s  rqr�zSqlJinjaLexer.analyse_text�sr��
��
�9�/��6�6�	��#�I�B�
�9�2�D�9�9�	��$�J�B�
�9�N���D�
�
�	�

�$�J�B��	rr)
r�r�r�r�r�r�r�rnr�r�r�s@rqrere�sj����������D��m�G�5�5�5�I�;�;�;�;�;�������rrre)wr�r��pygments.lexers.htmlrr�pygments.lexers.javascriptrr�pygments.lexers.cssr�pygments.lexers.phpr�pygments.lexers.pythonr	�pygments.lexers.perlr
�pygments.lexers.jvmrr�pygments.lexers.datar
�pygments.lexers.sqlr�pygments.lexerrrrrrrrrr�pygments.tokenrrrrrrrrr r!r"r#�
pygments.utilr$r%�__all__r*r/rTrUrVr4r>r?r@rBrArCrDrErFrGrHr$rJrKrLrMr;r<r:r9r=r<r+r,r-r.r&r'r(r)r0r1r2r3r5r7r6r8r�rIrNrOrPrQr�rRrSrWr�rXrYrZr[r\r]r^r_r`rarbrcrdrerkrrrq�<module>r-s�
����
�	�	�	�4�4�4�4�4�4�4�4�B�B�B�B�B�B�B�B�(�(�(�(�(�(�(�(�(�(�(�(�.�.�.�.�.�.�*�*�*�*�*�*�7�7�7�7�7�7�7�7�*�*�*�*�*�*�(�(�(�(�(�(�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�>�>�>�>�>�>�>�>�����.\�\�\�\�\�u�\�\�\�~6�6�6�6�6�*�6�6�6�rP�P�P�P�P�J�P�P�P�f
>�
>�
>�
>�
>��
>�
>�
>� ���������,P�P�P�P�P�*�P�P�P�f,�,�,�,�,�*�,�,�,�^
<�
<�
<�
<�
<�o�
<�
<�
<� 
;�
;�
;�
;�
;�_�
;�
;�
;� B�B�B�B�B�O�B�B�B�$
;�
;�
;�
;�
;�_�
;�
;�
;� 4�4�4�4�4��4�4�4�n@�@�@�@�@�
�@�@�@�F
:�
:�
:�
:�
:�O�
:�
:�
:� 
9�
9�
9�
9�
9�?�
9�
9�
9� @�@�@�@�@�/�@�@�@�$
9�
9�
9�
9�
9�?�
9�
9�
9�$
$�
$�
$�
$�
$��
$�
$�
$�)�)�)�)�)�:�)�)�)�X=�=�=�=�=��=�=�=�<�<�<�<�<�o�<�<�<�C�C�C�C�C�_�C�C�C�( � � � � �j� � � �F=�=�=�=�=�
�=�=�=�@8�8�8�8�8�o�8�8�8�.7�7�7�7�7�/�7�7�7�05�5�5�5�5�O�5�5�5�(5�5�5�5�5�_�5�5�5�"���������2�����/����*2�2�2�2�2�/�2�2�2�"2�2�2�2�2��2�2�2�(�����?����4�����/����(2�2�2�2�2�/�2�2�2�"+�+�+�+�+��+�+�+�(�����o����.�����_����*5�5�5�5�5�_�5�5�5�$5�5�5�5�5�O�5�5�5�(�����o����0�����_����,5�5�5�5�5�_�5�5�5�&5�5�5�5�5�O�5�5�5�2�����:����2���������.7�7�7�7�7�*�7�7�7�r.�.�.�.�.�o�.�.�.�&.�.�.�.�.�_�.�.�.�&-�-�-�-�-�j�-�-�-�`+�+�+�+�+�J�+�+�+�\
F�
F�
F�
F�
F�/�
F�
F�
F�J�J�J�J�J��J�J�J����������2�����:����,���������.�����_����8�����O����0�����O����4�����?����0J�J�J�J�J�j�J�J�J�Z@�@�@�@�@�/�@�@�@�"<�<�<�<�<�_�<�<�<�&K�K�K�K�K�*�K�K�K�\P�P�P�P�P�
�P�P�P�f:�:�:�:�:�O�:�:�:�"<�<�<�<�<�J�<�<�<�~
>�
>�
>�
>�
>��
>�
>�
>� �����O�����rr