HOME


Mini Shell 1.0
DIR: /lib/python3/dist-packages/pygments/lexers/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/pygments/lexers/__pycache__/templates.cpython-312.pyc
�

|�e�����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�Zvy)�z�
    pygments.lexers.templates
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for various template engines' markup.

    :copyright: Copyright 2006-2023 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�p�eZdZdZdZdZdgZdgZejdej�Zd�Zd�Z
d	�Zy
)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�V�ddlm}|di|��|_tj|fi|��y)Nr)�	RubyLexer�)�pygments.lexers.rubyrj�
ruby_lexerr�__init__)�self�optionsrjs   �;/usr/lib/python3/dist-packages/pygments/lexers/templates.pyrnzErbLexer.__init__Ds%��2�#�.�g�.���
���t�'�w�'�c#�jK�|jj|�}|j�dx}}		|dk(r-|j�}|t|f��|t|�z
}d}�n�|dk(�rl|j�}|dvr|t|f��|dz
}d}�n�|dk(rH|tj|f��|j�}|dzt|f��|dt|�zz
}d}�nA|dvrt|tj|f��|t|�z
}|j�}d}|jj|�D]\}}	}
||z|	|
f���|t|�z
}d}n�|dvr|t|f��|t|�z
}d}n�|tj|df��d}|jj|dd	�D]\}}	}
|dz|z|	|
f���|t|�z
}d}nJ|dk(rE|j�}|dvr|t|f��n|tj|f��|t|�z
}d}���#t$rYy	wxYw�w)
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.
        r�)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_unprocessedIse�������%�%�d�+����������9	���A�:� �*�*�,�C��u�c�/�)��3�s�8�O�C��E��a�Z� �*�*�,�C��n�,�!�5�#�o�-��q��� !�����!�7�?�?�C�7�7�$�j�j�l��!�A�g�w��3�3��q�3�s�8�|�+�� !��� 4�4�!�7�?�?�C�7�7��s�3�x���%�z�z�|�� !�� $��� F� F�t� L�@�3�E�7�G�"'�#�+�w��"?�?�@��s�4�y�(�� !���
�-�!�5�#�o�-��s�3�x��� !��"�7�?�?�C��F�:�:� !�� $��� F� F�s�1�2�w� O�D�3�E�7�G�"%��'�E�/�7�G�"C�C�D��s�3�x��� !���a�Z� �*�*�,�C��-�/�!�5�#�o�-�!�7�?�?�C�7�7��3�s�8�O�C��E�m��n�	��	�s#�0H3�G1H$�$	H0�-H3�/H0�0H3c��d|vrd|vryyy)Nrwrx皙�����?rk�r�s rq�analyse_textzErbLexer.analyse_text�s���4�<�D�D�L��)�<rrN)�__name__�
__module__�__qualname__�__doc__�name�url�aliases�	mimetypes�re�compile�Mryrnrr�rkrrrqr*r*3sJ����D�
'�C��g�G�0�1�I���
�
�H�"�$�$�O�I�(�
B�Hrrr*c
�@�eZdZdZdZdZdgZdgZdgZe	je	jzZde
fdeej eej �fd	eej eed
��ej �fdeej ej(e�dfd
ej dfgdefd
ej dfdej dfdej,fdej,fdefdej2fdefdej8fdej:fdej<fgd�Zd�Z y)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�sk��
��
�9�9�.��5��$�J�B�
�9�9�.��5��$�J�B�
�9�9�8�$�?��$�J�B�
�9�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/�sQ����D�
#�C��j�G��	�I�'�(�I��L�L�2�9�9�$�E��u��
!�
�g�o�o�w����
@�
B�
(�
�g�o�o�u�X�4�'H��o�o�'�
(�*�
�g�o�o�t�}�}�d�
;�X�
G�
�G�O�O�X�.�

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

��F�8
rrr/c��eZdZdZdZdZdgZddgZejejzZdZde
fd	eej eej �fd
eej e�fdezdzeej ej$ej e�d
fdezdzeej ej$ej �fdedfgeej(fdedfdezdzeeej(�dfdedfed�gdefdedfdezdzej$fed�gdefed�dedfgdedfdefdefd ej4fd!ej6fd"efd#efd$ej<fdedfd%edfd&edfdedfdedfdedfgd'�Zd(�Z y))*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�9�8�$��	�	�J��$�J�B�
�9�9�5�t�R�Y�Y�G��$�J�B�
�9�9�:�D�"�)�)�L��$�J�B�
�9�9�0�15�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�s0����D�
(�C��l�G���#�I��L�L�2�9�9�$�E� �J����
�
�g�o�o�w����
@�
B�
�
�g�o�o�w�
/�
1�
�*�
$�'7�
7�
�g�o�o�t�}�}�g�o�o�{�
S�
�
 ��*�
$�{�
2�
�g�o�o�t�}�}�g�o�o�
F�
H�
��j�1�
�����'�
�K��.�
�
�
"�T�
)�
�k�4�=�=�
1�7�
<�
�K��(��F�O�

�N�
�
�
�H�o�.�
�Z�
�%�
'����7��L�!�
��h���L�!�
�H�f�%�
���j�1�
�T�N�
�k�"�
(�&�-�-�8�
(�&�-�-�8�
&��/�
�F�#�
#�W�%5�%5�6�
�K��)�
�K��(�
�K��)�
�K��(�
�K��)�
�K��(�
�E2�F�hrrrTc�:��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�8��t�|�ttfi|��y�N)�superrnrrT�rorp�	__class__s  �rqrnzVelocityHtmlLexer.__init__*����
����M�=�W�=rr)
r�r�r�r�r�r��alias_filenamesr�rn�
__classcell__�r�s@rqrUrUs3�����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�8��t�|�ttfi|��yr�)r�rnrrTr�s  �rqrnzVelocityXmlLexer.__init__:s���
����=�<�G�<rrc�V�tj|�dz
}t|�r|dz
}|S�Nr�r�)rTr�r%r�s  rqr�zVelocityXmlLexer.analyse_text=s-��
�
'�
'��
-��
4���$���#�I�B��	rr�r�r�r�r�r�r�r�r�rnr�r�r�s@rqrVrV.s3�����D���G���'�O�+�,�I�=�rrrVc�|�eZdZdZdZddgZddgZejejzZ
defdejd	fd
efdeejeeeejeejeeeej�fdeejeeeejeejeeeej�fd
eejeeeej$�dfdeejee�dfdefgdeeeej$�fdeeeeeej$�fdej(fdefdej*fdej,fdej,fdej0fdej2fdefdefgdefdeeej�dfed�gdefd eeej�dfed�d!efgd"�Zd#�Zy$)%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�9�-�t�4�@��#�I�B�
�9�9�)�4�0�<��#�I�B�
�9�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�rkrrrqr4r4Ds+����D���!�G�2�4I�J�I��D�D�2�4�4�K�E��u��
�g�o�o�u�-�
�7�#�5�
�g�o�o�t�W�d�G�O�O��w����g�t��o�o�'�
(�1�
�g�o�o�t�W�d�G�O�O��G�O�O�T�7�D��o�o�'�
(�8�
�g�o�o�t�W�d�D�M�M�
J�
�
�+�
�g�o�o�t�W�
5�w�
@�
�E�N�/
�4(�
�h��d�m�m�
4�
6�
3�
�g�t�W�d�D�M�M�
B�
D�
5�w�~�~�F�G�
�
�-�d�l�l�;�
����/�
�t�}�}�%�
*�F�M�M�:�
*�F�M�M�:�
0�(�;�'�(.�
0�
�&�T�N�
�H�T�7�?�?�;�V�D��J��
��T�N�
�8�D�'�/�/�:�F�C��J��
�;��	
�c7�F�rrrr4c��eZdZdZdZdZdgZddgZdgZdd	e	fd
e
eje	ejejee�ej�fde
ejejejee�ej�fde
ejejee�ej�fd
e
ejejee�ej�fdejfde
ejee�ej�fdefde
ejee�e�fde
ee�fg
iZy)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>�sa����D�
"�C��j�G��.�)�I�'�(�I�	�
�T�N�
C�
�d�h�h��d�m�m�T�X�X��D�k�4�8�8�-�
.�4�
�d�h�h��
�
�t�x�x��K�(�$�(�(�4�
5�)�
�d�h�h��
�
�u�[�/A�4�8�8�
L�
N�
*�
�d�h�h��
�
�u�[�/A�4�8�8�
L�
N�
�d�h�h��
#�
�d�h�h��k� 2�D�H�H�
=�
?�
$�g�.�
(�
�d�h�h��k� 2�E�
:�
<�	� ��x�0�	
2�%
��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�8��t�|�ttfi|��yr�)r�rnrr>r�s  �rqrnzMyghtyHtmlLexer.__init__�����
����K�;�7�;rr�	r�r�r�r�r�r�r�rnr�r�s@rqr?r?�s(�����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�8��t�|�ttfi|��yr�)r�rnrr>r�s  �rqrnzMyghtyXmlLexer.__init__�����
����;�:�'�:rrr�r�s@rqr@r@�s(�����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�8��t�|�ttfi|��yr�)r�rnrr>r�s  �rqrnzMyghtyJavascriptLexer.__init__�����
����+�A��Arrr�r�s@rqrBrB�s,�����D�"�K�0�G�+�I�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�8��t�|�ttfi|��yr�)r�rnrr>r�s  �rqrnzMyghtyCssLexer.__init__rrrr�r�s@rqrArA�s(�����D��n�G�"�#�I�;�;rrrAc���eZdZdZdZdZdgZgd�ZdgZdde	fd	e
eje
jej�fd
e
eje	ejejee�ej�fde
ejdddee�ej�fd
e
ejejee�ej�fde
ejejee�ej�fdejfde
ejee�ej�fde
fde
ejee�e�fde
ee�e�fgiZd�Zy)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}|Stjd|tj��d}|S)Nr�z</%(class|doc|init)>g�?z<&.+&>g)\��(�?r�)r��results  rqr�zMasonLexer.analyse_text6sH����
�9�9�,�d�3�?��F��
��Y�Y�y�$��	�	�
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�I�&�'�I�	�
�Z� �
*�
�d�h�h�� 1� 1�4�8�8�
<�
>�
C�
�d�h�h�
�D�M�M�4�8�8��D�k�4�8�8�-�
.�6�
�d�h�h��d�D�%�	�2B�D�H�H�
M�
O�
,�
�d�h�h��
�
�u�Y�/?����
J�
L�
*�
�d�h�h��
�
�u�Y�/?����
J�
L�
�d�h�h��
#�
�d�h�h��i� 0�$�(�(�
;�
=�
$�g�.�
(�
�d�h�h��i� 0�%�
8�
:�	� ��i� 0�(�;�	
=�'
��F�BrrrCc�0�eZdZdZdZdZdgZdgZdgZde	e
jejee�fde	e
jejee�e�fd	e	e
jej$e
j�fd
ej&fde	ejej*�dfd
e	ejej*ej�fdejdfde	ejee�ej�fde	ejee�ej�fde	ee�fde
fgdejfdej*fed�gde	ej0e
e�fdejdfde
fgdedfdedfdedfgd�Zy)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�/�
�d�o�o�w�����
G�
I�
'�
�d�o�o�w����k�8J�E�
R�
T�
&�
�d�o�o�w�~�~�t���
G�
I�
$�g�&7�&7�8�
�
�g�o�o�t�|�|�
4�e�
=�
!�
�g�o�o�t�|�|�W�_�_�
E�
G�
����+�>�
'�
�g�o�o�u�[�'9�7�?�?�
K�
M�
�
�g�o�o�u�[�'9�7�?�?�
K�
M�
��%��*�

,��T�N�? 
�D�G�O�O�$�
7����F��E�N�
�*�
�d�n�n�d�F�
3�
5�
�����0�
�T�N�	
��f�f�%�
�f�f�%�
���(�
�[2�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�8��t�|�ttfi|��yr�)r�rnrrDr�s  �rqrnzMakoHtmlLexer.__init__�����
����I�9��9rrr�r�s@rqrErE�s(�����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�8��t�|�ttfi|��yr�)r�rnrrDr�s  �rqrnzMakoXmlLexer.__init__�����
����9�8��8rrr�r�s@rqrFrF�s(�����D��l�G�'�(�I�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�8��t�|�ttfi|��yr�)r�rnrrDr�s  �rqrnzMakoJavascriptLexer.__init__�s���
����)�?�w�?rrr�r�s@rqrGrG�s,�����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�8��t�|�ttfi|��yr�)r�rnrrDr�s  �rqrnzMakoCssLexer.__init__�rrrr�r�s@rqrHrH�s(�����D��l�G� �!�I�9�9rrrHc��eZdZdZd�Zy)�CheetahPythonLexerzI
    Lexer for handling Cheetah's special $ tokens in Python syntax.
    c#��K�tdi|j��}|j|�D]5\}}}|tjk(r|dk(rt
j}|||f���7y�w)N�$rk)r	rprr#rrr~)ror��pylexer�pos�type_�values      rqrz)CheetahPythonLexer.get_tokens_unprocessed�s`�����-����-��!(�!?�!?��!E�	$��C�������#���������u�e�#�#�	$�s�A A"N)r�r�r�r�rrkrrrqr$r$�s���$rrr$c�X�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	iZy)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�	�
��w��
"�
 �'�*�
"�G�O�O�4�
����)�
*��w����.@�(A����(�
*�(�
�g�o�o�u�-?�'@�
A�
C�
%�
�g�o�o�u�-?�'@��o�o�'�
(���
��T�N�/
��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�8��t�|�ttfi|��yr�)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�8��t�|�ttfi|��yr�)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�8��t�|�ttfi|��yr�)r�rnrrJr�s  �rqrnzCheetahJavascriptLexer.__init__+s���
����,�B�'�Brrr�r�s@rqrMrMs)����
 �D�5�G�-�I�C�CrrrMc�N�eZdZdZdZdZdgZddgZdefde	e
e�fd	e	e
ej�d
fe
d�defgd
e
dfdee�dfde	ee
ee��dfdedfde	ee
e�dfgde	ejee�ej�fdej$fgd�Zy)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��g�6�7�
�8�D�'�/�/�:�K�H��J��
���
��D�&�!�
#�U�;�%7��@�
0�
�g�t�U�;�%7�
8�&�
B�
$�g�v�6�
&���$��(H�&�Q�

�'�
�g�o�o�u�[�'9�7�?�?�
K�
M�
,�
�]�]�
�
�!�Frrr;c��eZdZdZej
Zdefdee	jee�e	j�fdefde
jdfde
jdfed	�d
efgdefde
j"d
fde
jdfgdeeee�e�dfdeeee�e�dfdedfgdefde
j"d
fde
j"dfde
jdfgdedfdedfdedfgdedfed�defgdedfed�defgdefed	�gdee	jee�e	j�fde
j&fgd�	Zy) �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�I�E����
%�
�g�o�o�u�[�'9�7�?�?�
K�
M�8��?�
#�T�X�X�w�7�
"�D�H�H�e�4��J��
�e��

��T�N�
�T�^�^�X�6�
����&�)�
��H�V�U�;�-?��H�&�Q�
�H�V�U�;�-?��H�&�Q�
���(�
��T�N�
�t�~�~�x�8�
�T�^�^�V�4�
����&�)�	
��&�.�)�
�&�.�)�
���(�
��&�&�!��I��
�&�M�
��&�&�!��I��
�&�M�
��� ��J��
�
'�
�g�o�o�u�[�'9�7�?�?�
K�
M�
-�
�]�]�
�
�_5�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�8��t�|�ttfi|��yr�)r�rnrr<r�s  �rqrnzHtmlGenshiLexer.__init__�s���
����$5�A��Arrc��d}tjd|��|dz
}tjd|��|dz
}|tj|�zdz
S�Nr�z	\$\{.*?\}皙�����?zpy:(.*?)=["\']r�)r�r�rr�r�s  rqr�zHtmlGenshiLexer.analyse_text�sW��
��
�9�9�\�4�(�4��#�I�B�
�9�9�&��-�9��#�I�B��I�*�*�4�0�0�4�7�7rrr�r�s@rqr:r:�s1����
�D��j�)�G�4�O�#�$�I�B�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�8��t�|�ttfi|��yr�)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�sW��
��
�9�9�\�4�(�4��#�I�B�
�9�9�&��-�9��#�I�B��H�)�)�$�/�/�$�6�6rr�r�r�r�r�r�r�r�r�r�rnr�r�r�s@rqr9r9�s8����
�D�8�G��	�I��i�O�'�)<�=�I�A�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�8��t�|�ttfi|��yr�)r�rnrr;r�s  �rqrnzJavascriptGenshiLexer.__init__�s���
����/�E�W�Errc�2�tj|�dz
S�N皙�����?�r9r�r�s rqr�z"JavascriptGenshiLexer.analyse_text�����'�'��-��4�4rrr�r�s@rqr=r=�s/����$�D�$�G��h�O�+�I�F�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�8��t�|�ttfi|��yr�)r�rnrr;r�s  �rqrnzCssGenshiLexer.__init__�s���
����?�>�g�>rrc�2�tj|�dz
SrWrYr�s rqr�zCssGenshiLexer.analyse_text�rZrrr�r�s@rqr<r<�s2�����D���.�G��i�O�"�#�I�?�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�8��t�|�ttfi|��yr�)r�rnrr*r�s  �rqrnzRhtmlLexer.__init__�����
����H�8��8rrc�V�tj|�dz
}t|�r|dz
}|S�Nr�g�?)r*r�r$r�s  rqr�zRhtmlLexer.analyse_text�s-��
�
"�
"�4�
(�4�
/����%��#�I�B��	rrrRr�s@rqr+r+�s2�����D�0�G���I�4�O�!�"�I�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�8��t�|�ttfi|��yr�)r�rnrr*r�s  �rqrnzXmlErbLexer.__init__
����
����8�7�w�7rrc�V�tj|�dz
}t|�r|dz
}|Sr�)r*r�r%r�s  rqr�zXmlErbLexer.analyse_text
�-��
�
"�
"�4�
(�4�
/���$���#�I�B��	rrr�r�s@rqr,r,�s2����
�D��9�%�G��i�O�'�(�I�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�8��t�|�ttfi|��yr�)r�rnrr*r�s  �rqrnzCssErbLexer.__init__rhrrc�2�tj|�dz
SrW�r*r�r�s rqr�zCssErbLexer.analyse_text!����$�$�T�*�T�1�1rrr�r�s@rqr-r-s2�����D��9�%�G��i�O� �!�I�8�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�8��t�|�ttfi|��yr�)r�rnrr*r�s  �rqrnzJavascriptErbLexer.__init__2����
����(�>�g�>rrc�2�tj|�dz
SrWrnr�s rqr�zJavascriptErbLexer.analyse_text5rorrr�r�s@rqr.r.%s,����
�D�H�G��h�O�)�I�?�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�8��t�|�ttfi|��yr�)r�rnrrr�s  �rqrnzHtmlPhpLexer.__init__Ircrrc�V�tj|�dz
}t|�r|dz
}|Sre)rr�r$r�s  rqr�zHtmlPhpLexer.analyse_textLs-��
�
"�
"�4�
(�4�
/����%��#�I�B��	rrrRr�s@rqr&r&9s6�����D��l�G���I�%�O�I�I�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�rurvzapplication/xml+phpc�8��t�|�ttfi|��yr�)r�rnrrr�s  �rqrnzXmlPhpLexer.__init__]rhrrc�V�tj|�dz
}t|�r|dz
}|Sr�)rr�r%r�s  rqr�zXmlPhpLexer.analyse_text`rjrrr�r�s@rqr'r'Ss-�����D��k�G�6�O�&�'�I�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�8��t�|�ttfi|��yr�)r�rnrrr�s  �rqrnzCssPhpLexer.__init__qrhrrc�2�tj|�dz
SrW�rr�r�s rqr�zCssPhpLexer.analyse_texttrorrr�r�s@rqr(r(gs/�����D��k�G��i�O�� �I�8�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�8��t�|�ttfi|��yr�)r�rnrrr�s  �rqrnzJavascriptPhpLexer.__init__�rrrrc�,�tj|�Sr�rr�s rqr�zJavascriptPhpLexer.analyse_text�s���$�$�T�*�*rrr�r�s@rqr)r)xs1����
�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�8��t�|�ttfi|��yr�)r�rnrr/r�s  �rqrnzHtmlSmartyLexer.__init__�r�rrc�V�tj|�dz
}t|�r|dz
}|Sre)r/r�r$r�s  rqr�zHtmlSmartyLexer.analyse_text��-��
�
%�
%�d�
+�d�
2����%��#�I�B��	rrr�r�s@rqr0r0�s-�����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�8��t�|�ttfi|��yr�)r�rnrr/r�s  �rqrnzXmlSmartyLexer.__init__�rrrc�V�tj|�dz
}t|�r|dz
}|Sr�)r/r�r%r�s  rqr�zXmlSmartyLexer.analyse_text��-��
�
%�
%�d�
+�d�
2���$���#�I�B��	rrr�r�s@rqr1r1�s2����
�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�8��t�|�ttfi|��yr�)r�rnrr/r�s  �rqrnzCssSmartyLexer.__init__�rrrc�2�tj|�dz
SrW�r/r�r�s rqr�zCssSmartyLexer.analyse_text�rZrrr�r�s@rqr2r2�s2����
�D��n�G���(�O�"�#�I�;�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�8��t�|�ttfi|��yr�)r�rnrr/r�s  �rqrnzJavascriptSmartyLexer.__init__�rrrc�2�tj|�dz
SrWr�r�s rqr�z"JavascriptSmartyLexer.analyse_text�rZrrr�r�s@rqr3r3�s5����
�D�"�K�0�G��w�'�O�+�I�B�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�8��t�|�ttfi|��yr�)r�rnrr4r�s  �rqrnzHtmlDjangoLexer.__init__�r�rrc�V�tj|�dz
}t|�r|dz
}|Sre)r4r�r$r�s  rqr�zHtmlDjangoLexer.analyse_text�r�rrrRr�s@rqr5r5�s3�����D�9�G�j�I�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�8��t�|�ttfi|��yr�)r�rnrr4r�s  �rqrnzXmlDjangoLexer.__init__rrrc�V�tj|�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�8��t�|�ttfi|��yr�)r�rnrr4r�s  �rqrnzCssDjangoLexer.__init__rrrc�2�tj|�dz
SrW�r4r�r�s rqr�zCssDjangoLexer.analyse_textrZrrrRr�s@rqr6r6s?����
�D��[�)�G��^�,�I��i�O�"�$4�5�I�;�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�8��t�|�ttfi|��yr�)r�rnrr4r�s  �rqrnzJavascriptDjangoLexer.__init__1rrrc�2�tj|�dz
SrWr�r�s rqr�z"JavascriptDjangoLexer.analyse_text4rZrrrRr�s@rqr8r8s9����
%�D�/�G��M�*�I��h�O�*�I�B�5rrr8c�N�eZdZdZdedfdefdefdefgdedfd	ee�fgd
�Zy)�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�8sW����w��&�
S�
�
�
�u��
�5�M�

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

    .. versionadded:: 0.7
    zJava Server Page�jspz*.jspzapplication/x-jspc�8��t�|�ttfi|��yr��r�rnrr�r�s  �rqrnzJspLexer.__init__\r4rrc�p�tj|�dz
}t|�r|dz
}d|vr	d|vr|dz
}|S�Nr�r�rwrxr�)rr�r%r�s  rqr�zJspLexer.analyse_text_sC��
�
#�
#�D�
)�D�
0���$���#�I�B��4�<�D�D�L��#�I�B��	rr�r�r�r�r�r�r�r�r�rnr�r�r�s@rqrIrIQs/����
�D��g�G��	�I�$�%�I�<�rrrIc��eZdZdZdZdgZdgZdgZejZ
defdejdfd	efd
ejfdeeej"edee�fd
eeej"edeee�e�fdeeej"edee�e�fdeeej"�fdeedee�ej"dde�fdefg
dejfdejdfdejdfdejfgd�Zd�Zy)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|vryy)z.Evoque templates use $evoque, which is unique.z$evoquertNrkr�s rqr�zEvoqueLexer.analyse_text�s������rr)r�r�r�r�r�r�r�r�r�r�r�r"rrrrrr�r rr	r�r�rkrrrqrNrNhsl���
�D��j�G���I�'�(�I��I�I�E����
�W�&�&�	�2�
�e��
��!2�!2�3�
7�
�k�4�<�<��d��k�+�
,�!�
�k�4�<�<��d��e�K�0�+�?�
@�
2�
�k�4�<�<��d��K�(�+�7�
8�"�8�K����#F�G�
5�
�k�4��{�);��l�l�D�$��=�
>��5�M�9
�>��)�)�*�
�W�&�&��0�
�W�&�&��/�
�w�(�(�)�	
�?%�F�NrrrNc�>��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�8��t�|�ttfi|��yr�)r�rnrrNr�s  �rqrnzEvoqueHtmlLexer.__init__�r�rrc�,�tj|�Sr��rNr�r�s rqr�zEvoqueHtmlLexer.analyse_text�����'�'��-�-rrr�r�s@rqrOrO�s/�����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�8��t�|�ttfi|��yr�)r�rnrrNr�s  �rqrnzEvoqueXmlLexer.__init__�rrrc�,�tj|�Sr�r�r�s rqr�zEvoqueXmlLexer.analyse_text�r�rrr�r�s@rqrPrP�s/�����D��n�G��	�I�)�*�I�;�.rrrPc���eZdZdZdZdgZgZgZejZ
dejfdejfdefdefdefd	efd
efdefdefd
ej dfdejfdefdefdej&fdej&fdeej,ee�fdej2fdefdefgdej fdej4fdej fdej fd
ej dfgd�Zy)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�sR����D��g�G��I��I��M�M�E�����(�
 �'�"3�"3�4�
��"�
�H�%�
�h�'�
�x� �
2�H�=�
��"�
�H��
�6�=�=�(�+��v�}�}�%�
�V��M�NU�
W�$�W�%5�%5�6�
T�
�]�]�
�
(�
�d�m�m�T�;�
7�
9�
�t�}�}�-�
 �+�.�
�T�N�3
�8�F�M�M�"�
�v�}�}�%�
��
�
�&�
�6�=�=�!�
�6�=�=�&�)�
�9#�FrrrQc���eZdZdZdZdgZgZgZdefe	d�defgde
jdfd	e
fd
ejdfdeejee�ej�fd
eejee�ej�fgdefdeeee�e�fdejdfe	d�defdefgde
jdfde
jdfde
jfgd�Zy)�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��s?����D��f�G��I��I��u���F�O�
���
��w�(�(�+�6�
��(�
�t�|�|�Z�8�
8�
�d�l�l�E�/�$:�D�L�L�
I�
K�Q��d�l�l�E�/�$:�D�L�L�
I�	
K�
����
�X�k�5��3I�&1�3�
4�����f�5��F�O�
�U�#�
�5�M�	
��w�(�(�'�2�
�g�'�'��0�
+�W�->�->�?�
�;"�Frrr�c�:��eZdZdZdZdgZddgZdgZ�fd�Z�xZ	S)rRz#
    Coldfusion markup in html
    zColdfusion HTML�cfmz*.cfmz*.cfmlzapplication/x-coldfusionc�8��t�|�ttfi|��yr�)r�rnrr�r�s  �rqrnzColdfusionHtmlLexer.__init__.s���
����$9�E�W�Err�
r�r�r�r�r�r�r�r�rnr�r�s@rqrRrR%s4�����D��g�G��(�#�I�+�,�I�F�FrrrRc�6��eZdZdZdZdgZdgZgZ�fd�Z�xZ	S)rSzH
    Coldfusion markup/script components

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

    .. versionadded:: 1.4
    zScalate Server Page�sspz*.sspzapplication/x-sspc�8��t�|�ttfi|��yr�r�r�s  �rqrnzSspLexer.__init__Lr4rrc�z�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_textOsJ��
��
�9�9�^�T�*��#�I�B��$���#�I�B��4�<�D�D�L��#�I�B��	rrr�r�s@rqrWrWAs/����
!�D��g�G��	�I�$�%�I�<�rrrWc�H�eZdZdZdedfdefdefgdedfdee�fgd	�Zy
)�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�ZsL����w��&�
�u��
�5�M�
��G�V�$�
!�5��#6�7�
�
�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�8��t�|�ttfi|��yr�)r�rnrr�r�s  �rqrnzTeaTemplateLexer.__init__{s���
����#7�C�7�Crrc�p�tj|�dz
}t|�r|dz
}d|vr	d|vr|dz
}|Sr�)rr�r%r�s  rqr�zTeaTemplateLexer.analyse_text~sC��
�
&�
&�t�
,�t�
3���$���#�I�B��4�<�D�D�L��#�I�B��	rrr�r�s@rqrXrXps/����
�D��g�G��	�I���I�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�8��t�|�ttfi|��yr�)r�rnrrr�s  �rqrnzLassoHtmlLexer.__init__�s���
����J�:�'�:rrc�V�tj|�dz
}t|�r|dz
}|Sre)rr�r$r�s  rqr�zLassoHtmlLexer.analyse_text�s-��
�
$�
$�T�
*�T�
1����%��#�I�B��	rrr�r�s@rqrYrY�s.�����D��n�G�3�O�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�8��t�|�ttfi|��yr�)r�rnrrr�s  �rqrnzLassoXmlLexer.__init__�s���
����:�9��9rrc�V�tj|�dz
}t|�r|dz
}|Sr�)rr�r%r�s  rqr�zLassoXmlLexer.analyse_text�s-��
�
$�
$�T�
*�T�
1���$���#�I�B��	rrr�r�s@rqrZrZ�s/�����D��m�G�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�B��d|d<t�|�ttfi|��y�NT�requiredelimiters)r�rnrrr�s  �rqrnzLassoCssLexer.__init__�s"���'+��#�$�
����:�9��9rrc�~�tj|�dz
}tjd|�r|dz
}d|vr|dz
}|S)NrXz
\w+:[^;]+;r�zpadding:)rr�r�r�r�s  rqr�zLassoCssLexer.analyse_text�sD��
�
$�
$�T�
*�T�
1��
�9�9�]�D�)��#�I�B�����#�I�B��	rrr�r�s@rqr[r[�s/�����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�B��d|d<t�|�ttfi|��yr�)r�rnrrr�s  �rqrnzLassoJavascriptLexer.__init__�s"���'+��#�$�
����*�@��@rrc�6�tj|�dz
}|SrW)rr�r�s  rqr�z!LassoJavascriptLexer.analyse_text�s��
�
$�
$�T�
*�T�
1���	rrr�r�s@rqr\r\�s2�����D�!�:�.�G��h�O�*�I�A�rrr\c���eZdZdZdZdZdgZdefdefde	eje�dfd	e	eje
je
j�dfd
e	eje�dfgdefdejd
fde	e
ej�d
fde	eje�fde	eee�fde	eeej$�fde	eee�dfed�gdefded
fde	eeej$e�fde	eeeed���fdej.fed�gdej$fdej$fdej$fged�dej2fdej4fd e
fgd!�Zy")#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�����>��F�(�
�g�o�o�v�'7�'7��9I�9I�
J�E�
S�
�X�g�o�o�t�<�e�D�

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

�g<�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�8��t�|�ttfi|��yr�)r�rnrr]r�s  �rqrnzHandlebarsHtmlLexer.__init__Gs���
����O�?�w�?rrr�r�s@rqr^r^:s8�����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�8��t�|�ttfi|��yr�)r�rnr
r4r�s  �rqrnzYamlJinjaLexer.__init__Zr�rrr�r�s@rqr_r_Ks-�����D�+�G�S�I�$�l�3�I�<�<rrr_c���eZdZdZdZdZdgZdgZiddefde	e
e�dfd	e	e
eee
d
���dfd
efg�ddejdfde	eje�eddd
�fde	ejee
�dfde	ej$eee
d��ee
�dfde	ej$ee
�dfde	ej$ee
�dfde	ejdee
�dfde	ej$dee
�dfde	ej$eee
d
��e
e�dfd e	ej$e�d!fg
�ded�d"e
dfd#e
d$fg�d$ed�d"e
d%fd&e	ej(e
e�d'fg�d'd#e
dfed(�ed)�g�ded�ed�d*e	ee
d
��eeeee
d
��ee
�fd+efd,ej,fd-e	ee
d
��eej,eee
d
���fed
�ed�g�d.ed
�ed/�g�d0d1e	eede�dfd2e	eej,e�dfg�d(d"e
dfg�dd3e
d%fg�d/d4edfg�d5ed�d6e	ej.ee�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>ej0fg�d?ej2fd@e
fgdAej6fdBej8fgdCej<fdDej>fged:�ed8�ed9�ed�gdEefgdFe	e
eej$ee
�d%fd<e fgdefdGe	e
eej$ee
�dfd
efgdH��Z!y)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�[�*�=�~�N�
$�
�k�:�u�T�9�/M�
N�
�
��D�M�	
�@�	�
-�w�/?�/?��M�
�X�g�&6�&6�
�C�
�n�l�I�
>�
@�
 �
�g�&�&�
�K�
@�&�
J�2�
�d�h�h�
�E�$�
�,K� �+�/�06�
8�$�
�d�h�h�
�K�
8�)�
E�
�
�d�h�h�
�K�
8�%�
A�0�
�g�&�&��j�+�
F��
P�
(�
�d�h�h��j�+�
>��
H�3�
�d�h�h�
��D�	�2�K��M�
"�
$������:� >��M�=
�@�Z	��L�!�
�k�6�*�
�K��+�	
�[@�h	��L�!�
�k�#3�4�
#�
�d�m�m�[�*�
=��
P�	
�i@�x	�
�K��(��L�!��*�+�
�y@�D	��N�#��L�!�
?�
�e�D�)�4�j�(� �%��i�"@�*�!�#�
$��X��
����'�
:�
�e�D�)�4�j�(�-�-� �%��i�"@�B�
C�
�I���L�!�
�E@�h	��I���'�(�
�i@�r	�
'�
�j�(�D�*�
=�v�
G�
(�
�j�(�-�-��
<�f�
F�
�s@�@	�
�k�6�*�
�A@�H	�
�[�"2�3�
�I@�P	�
�Z��(�
�Q@�Z	��L�!�
$�
�d�n�n�j�(�
;�
=�/�
�k�:�u�T�:�/N� �+�/�
0�
�H���H���I��
�;��
�[@�z	��N�#�
�4�L�!
�{@�D	 ��N�#��J��
�4�L�"
�E@�P	�
�[�"2�3��*�+�
�Q@�Z	�
�[�"2�3��+�,� 
�[@�f	�
 �'�"2�"2�3�
�g@�p�d�m�m�,�
��-�
�����'�
����'�
��&�,�,�'�
�V�^�^�$�
�
�I���H���H���J��	
��
�#�
�1�
�k�:�t�x�x��!�#�$4�
6��7�O�	
��t��
,�
�k�:�t�x�x��!�#�$*�
,��D�M�
�s@�Frrr`c��eZdZdZdZdgZdgZejejzZ
dZdZdezdzZ
ee
zZd	efd
ej"dfdefd
eej"eeeej"eej"eeeej"�fdeej"eeeej"eej"eeeej"�fdezeej"eeeej,�dfdeej"ee�dfdefgdezeeeej,�fdezeeeeeej,�fdej0fdefdej2feej4fdezej4fdefdej:fdej<fdefdefgdefdeeej"�d fed!�gdefd"eeej"�d fed!�d#e fgd$�Z!y%)&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�D�2�4�4�K�E�*�K�/�L��+�%��,�J��*�,�L��u��
�g�o�o�u�-�
�W�%�1�
�g�o�o�t�W�d�G�O�O��W�_�_�d�G�T��o�o�'�
(�
6�
�g�o�o�t�W�d�G�O�O��W�_�_�d�G�T��o�o�'�
(�/��
=�
�g�o�o�t�W�d�D�M�M�
J�
�
�+�
�g�o�o�t�W�
5�u�
>�
�E�N�-
�2��
,�
�h��d�m�m�
4�
6�
(�<�
7�
�g�t�W�d�D�M�M�
B�
D�
,�g�n�n�=�5��	
�
&�t�|�|�4�
�4�=�=�)�
�\�
!�4�=�=�1�
�&�!�
*�F�M�M�:�
*�F�M�M�:�
D�h�O�'�(.�
0�%
�,�T�N�
�H�T�7�?�?�;�V�D��J��
��T�N�
�8�D�'�/�/�:�F�C��J��
�;��	
�g9�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�8��t�|�ttfi|��yr�)r�rnrrar�s  �rqrnzTwigHtmlLexer.__init__�rrrr�r�s@rqrbrbs/�����D��m�G��
�I�!�"�I�:�:rrrbc���eZdZdZdZdZdgZdefdee	je�dfdeee
jeeee�d	fd
eee
jee�fdeee
jeee�d	fdeee
je�fgd
efde	jdfdej"fdej$fdej&fdefde
j*fde
j*fdeeeeeeeee�fg	dedfdedfdedfgd�Zy)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�sr����D�
4�C��g�G��5�!��X�g�o�o�t�<�n�M�7�
�k�4�>�>�;��h�PT�
U�
�
�/�
�k�4�>�>�;��
E�
G�.�
�k�4�>�>�4��4�
H�&�
R�
%�
�k�4�>�>�4�
8�
:�!
�*�T�"�
�g�o�o�v�.�����/�
*�F�M�M�:�
*�F�M�M�:�'�(.�
0�(����7�
!�4�=�=�1�>�
�h��f�d�H�d�F�D�
Q�
S�!
�(�f�f�%�
�f�f�%�
���(�
�Q-�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�8��t�|�ttfi|��yr�)r�rnrrcr�s  �rqrnzAngular2HtmlLexer.__init__�r�rr)	r�r�r�r�r�r�r�rnr�r�s@rqrdrd�s'�����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�8��t�|�ttfi|��yr�)r�rnrr4r�s  �rqrnzSqlJinjaLexer.__init__�rrrc��d}tjd|�r|dz
}tjd|�r|dz
}tjd|�r|dz
}|S)Nr�z\{\{\s*ref\(.*\)\s*\}\}r�z\{\{\s*source\(.*\)\s*\}\}r�z\{%-?\s*macro \w+\(.*\)\s*-?%\}r�r�r�s  rqr�zSqlJinjaLexer.analyse_text�sT��
��
�9�9�/��6��#�I�B�
�9�9�2�D�9��$�J�B�
�9�9�7��>��$�J�B��	rr)
r�r�r�r�r�r�r�rnr�r�r�s@rqrere�s%�����D��m�G�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�B�(�(�.�*�7�*�(�,�,�,�I�I�I�I�>���.\�u�\�~6�*�6�rP�J�P�f
>��
>� ���,P�*�P�f,�*�,�^
<�o�
<� 
;�_�
;� B�O�B�$
;�_�
;� 4��4�n@�
�@�F
:�O�
:� 
9�?�
9� @�/�@�$
9�?�
9�$
$��
$�)�:�)�X=��=�<�o�<�C�_�C�( �j� �F=�
�=�@8�o�8�.7�/�7�05�O�5�(5�_�5�"���2�/��*2�/�2�"2��2�(�?��4�/��(2�/�2�"+��+�(�o��.�_��*5�_�5�$5�O�5�(�o��0�_��,5�_�5�&5�O�5�2�:��2���.7�*�7�r.�o�.�&.�_�.�&-�j�-�`+�J�+�\
F�/�
F�J��J����2�:��,���.�_��8�O��0�O��4�?��0J�j�J�Z@�/�@�"<�_�<�&K�*�K�\P�
�P�f:�O�:�"<�J�<�~
>��
>� �O�rr