403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/pygments/lexers/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/pygments/lexers/__pycache__/templates.cpython-39.pyc
a

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

    Lexers for various template engines' markup.

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

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

    All options are also forwarded to the `RubyLexer`.
    ZERBZerbzapplication/x-ruby-templatingz*(<%%|%%>|<%=|<%#|<%-|<%|-%>|%>|^%[^%].*?$)cKs2ddlm}|fi|��|_tj|fi|��dS)Nr)�	RubyLexer)Zpygments.lexers.rubyrc�
ruby_lexerr
�__init__)�self�optionsrc�rh�=/usr/lib/python3.9/site-packages/pygments/lexers/templates.pyreBszErbLexer.__init__ccs |j�|�}|��d}}�z�|dkrN|��}|t|fV|t|�7}d}q |dk�r�|��}|dvr�|t|fV|d7}d}�q|dkr�|tj|fV|��}|dt|fV|dt|�7}d}n�|dv�r4|tj|fV|t|�7}|��}d}|j�	|�D]\}}	}
|||	|
fV�q|t|�7}d}n�|dv�r\|t
|fV|t|�7}d}n\|tj|dfVd}|j�	|dd	��D] \}}	}
|d||	|
fV�q�|t|�7}d}q |dkr |��}|dv�r�|t|fVn|tj|fV|t|�7}d}q Wnt�yYd	S0d	S)
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�Preprocrd�get_tokens_unprocessedr�
IndexError)rf�text�tokens�state�idx�val�tag�dataZr_idxZr_tokenZr_valuerhrhriruGsf


�
�

zErbLexer.get_tokens_unprocessedcCsd|vrd|vrdSdS)Nrmrn皙�����?rh�rwrhrhri�analyse_text�szErbLexer.analyse_textN)�__name__�
__module__�__qualname__�__doc__�name�aliases�	mimetypes�re�compile�Mrorerur�rhrhrhrir(1s
Dr(c
@s�eZdZdZdZdgZdgZdgZej	ej
BZdefde
ejeej�fde
ejeed	d
�ej�fde
ejeje�dfdejdfgd
efdejdfdejdfdejfdejfdefdejfdefdejfdejfdejfgd�Zdd�ZdS)r-z�
    Generic `Smarty <http://smarty.php.net/>`_ template lexer.

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

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

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

    z
HTML+Velocityz
html+velocity�*.htmlr�ztext/html+velocitycst�jttfi|��dS�N)�superrerrR�rfrg��	__class__rhrire&szVelocityHtmlLexer.__init__)
r�r�r�r�r�r��alias_filenamesr�re�
__classcell__rhrhr�rirSsrScs@eZdZdZdZdgZddgZdgZ�fdd�Zd	d
�Z	�Z
S)rTz`
    Subclass of the `VelocityLexer` that highlights unlexed data
    with the `XmlLexer`.

    zXML+Velocityzxml+velocity�*.xmlr�zapplication/xml+velocitycst�jttfi|��dSr�)r�rerrRr�r�rhrire6szVelocityXmlLexer.__init__cCs"t�|�d}t|�r|d7}|S�Nr�r~)rRr�r#r�rhrhrir�9szVelocityXmlLexer.analyse_text�r�r�r�r�r�r�r�r�rer�r�rhrhr�rirT*srTc@s|eZdZdZdZddgZddgZejej	BZ
defdej
d	fd
efdeej
eeeej
eej
eeeej
�fdeej
eeeej
eej
eeeej
�fd
eej
eeeej�dfdeej
ee�dfdefgdeeeej�fdeeeeeej�fdejfdefdejfdejfdejfdejfdejfdefdefgdefdeeej
�dfed�gdefd eeej
�dfed�d!efgd"�Zd#d$�Zd%S)&r2a
    Generic `django <http://www.djangoproject.com/documentation/templates/>`_
    and `jinja <https://jinja.pocoo.org/jinja/>`_ template lexer.

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

    .. versionadded:: 0.6

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

    .. versionadded:: 0.6
    zHTML+Myghtyzhtml+myghtyztext/html+myghtycst�jttfi|��dSr�)r�rerr<r�r�rhrire�szMyghtyHtmlLexer.__init__�	r�r�r�r�r�r�r�rer�rhrhr�rir=�s
r=cs0eZdZdZdZdgZdgZ�fdd�Z�ZS)r>zx
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `XmlLexer`.

    .. versionadded:: 0.6
    z
XML+Myghtyz
xml+myghtyzapplication/xml+myghtycst�jttfi|��dSr�)r�rerr<r�r�rhrire�szMyghtyXmlLexer.__init__r�rhrhr�rir>�s
r>cs4eZdZdZdZddgZgd�Z�fdd�Z�ZS)r@z
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `JavascriptLexer`.

    .. versionadded:: 0.6
    zJavaScript+Myghtyzjavascript+myghtyz	js+myghty)zapplication/x-javascript+myghtyztext/x-javascript+myghtyztext/javascript+mygthycst�jttfi|��dSr�)r�rerr<r�r�rhrire�szMyghtyJavascriptLexer.__init__r�rhrhr�rir@�s
r@cs0eZdZdZdZdgZdgZ�fdd�Z�ZS)r?zx
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `CssLexer`.

    .. versionadded:: 0.6
    z
CSS+Myghtyz
css+myghtyztext/css+myghtycst�jttfi|��dSr�)r�rerr<r�r�rhrireszMyghtyCssLexer.__init__r�rhrhr�rir?�s
r?c@s
eZdZdZdZdgZgd�ZdgZddefde	e
jej
e
j�fd	e	e
jee
je
jee�e
j�fd
e	e
jdddee�e
j�fde	e
je
jee�e
j�fd
e	e
je
jee�e
j�fde
jfde	e
jee�e
j�fdefde	e
jee�e�fde	ee�e�fgiZdd�ZdS)rAz�
    Generic `mason templates`_ lexer. Stolen from Myghty lexer. Code that isn't
    Mason markup is HTML.

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

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

    .. versionadded:: 0.7

    .. _mako templates: http://www.makotemplates.org/
    ZMakoZmakoz*.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�rmz'(?<=<%)(include|inherit|namespace|page)z((?:\w+)\s*=)(\s*)(".*?")�/?\s*>r��".*?"�'.*?'�[^\s>]+)r�r�r|�attrN)r�r�r�r�r�r�r�r�rrrrrtrr rrr�r�rr�rrr�rrxrhrhrhrirB=s`	�����
��
��"��
���rBcs0eZdZdZdZdgZdgZ�fdd�Z�ZS)rCzw
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `HtmlLexer`.

    .. versionadded:: 0.7
    z	HTML+Makoz	html+makoztext/html+makocst�jttfi|��dSr�)r�rerrBr�r�rhrire�szMakoHtmlLexer.__init__r�rhrhr�rirC�s
rCcs0eZdZdZdZdgZdgZ�fdd�Z�ZS)rDzv
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `XmlLexer`.

    .. versionadded:: 0.7
    zXML+Makozxml+makozapplication/xml+makocst�jttfi|��dSr�)r�rerrBr�r�rhrire�szMakoXmlLexer.__init__r�rhrhr�rirD�s
rDcs4eZdZdZdZddgZgd�Z�fdd�Z�ZS)rEz}
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `JavascriptLexer`.

    .. versionadded:: 0.7
    zJavaScript+Makozjavascript+makozjs+mako)zapplication/x-javascript+makoztext/x-javascript+makoztext/javascript+makocst�jttfi|��dSr�)r�rerrBr�r�rhrire�szMakoJavascriptLexer.__init__r�rhrhr�rirE�s
rEcs0eZdZdZdZdgZdgZ�fdd�Z�ZS)rFzv
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `CssLexer`.

    .. versionadded:: 0.7
    zCSS+Makozcss+makoz
text/css+makocst�jttfi|��dSr�)r�rerrBr�r�rhrire�szMakoCssLexer.__init__r�rhrhr�rirF�s
rFc@seZdZdZdd�ZdS)�CheetahPythonLexerzI
    Lexer for handling Cheetah's special $ tokens in Python syntax.
    ccsNtfi|j��}|�|�D].\}}}|tjkr<|dkr<tj}|||fVqdS)N�$)rrgrur!rrrt)rfrwZpylexer�pos�type_�valuerhrhriru�s
z)CheetahPythonLexer.get_tokens_unprocessedN)r�r�r�r�rurhrhrhrir��sr�c@s�eZdZdZdZddgZddgZddgZd	d
ee	�fde	fde	j
fd
e	j
fdee	j
ee�e	j
�fdee	j
ee��fdee	j
ee�e	j
�fde
fdefg	iZdS)rHa2
    Generic `cheetah templates`_ lexer. Code that isn't Cheetah
    markup is yielded as `Token.Other`.  This also works for
    `spitfire templates`_ which use the same syntax.

    .. _cheetah templates: http://www.cheetahtemplate.org/
    .. _spitfire templates: http://code.google.com/p/spitfire/
    ZCheetahZcheetahZspitfirez*.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�rrrtrr�r rrxrhrhrhrirH�s>	���������rHcs4eZdZdZdZgd�ZddgZ�fdd�Z�ZS)rIz_
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `HtmlLexer`.
    zHTML+Cheetah)zhtml+cheetahz
html+spitfireZhtmlcheetahztext/html+cheetahztext/html+spitfirecst�jttfi|��dSr�)r�rerrHr�r�rhrireszCheetahHtmlLexer.__init__r�rhrhr�rirI�s
rIcs4eZdZdZdZddgZddgZ�fdd�Z�ZS)	rJz^
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `XmlLexer`.
    zXML+Cheetahzxml+cheetahzxml+spitfirezapplication/xml+cheetahzapplication/xml+spitfirecst�jttfi|��dSr�)r�rerrHr�r�rhrireszCheetahXmlLexer.__init__r�rhrhr�rirJs
rJcs4eZdZdZdZgd�Zgd�Z�fdd�Z�ZS)rKze
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `JavascriptLexer`.
    zJavaScript+Cheetah)zjavascript+cheetahz
js+cheetahzjavascript+spitfirezjs+spitfire)z application/x-javascript+cheetahztext/x-javascript+cheetahztext/javascript+cheetahz!application/x-javascript+spitfireztext/x-javascript+spitfireztext/javascript+spitfirecst�jttfi|��dSr�)r�rerrHr�r�rhrire*szCheetahJavascriptLexer.__init__r�rhrhr�rirKs
rKc
@s�eZdZdZdZdgZddgZdefdee	e
�fdee	e
j�d	fed
�defgde	d
fde
e�d
fdeee	e
e��d
fded
fdeee	e
�d
fgdee
je
e�e
j�fdejfgd�ZdS)r9z]
    A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ text
    templates.
    zGenshi TextZ
genshitextzapplication/x-genshi-textz
text/x-genshiz[^#$\s]+z
^(\s*)(##.*)$z	^(\s*)(#)�	directiver�z[#$\s]z\nr�z(?:def|for|if)\s+.*z (choose|when|with)([^\S\n]+)(.*)z(choose|otherwise)\bz(end\w*)([^\S\n]*)(.*)�(?<!\$)(\$\{)(.+?)(\})z(?<!\$)(\$)([a-zA-Z_][\w.]*))r�r�r�N)r�r�r�r�r�r�r�r rrrrtrrrrrr�rxrhrhrhrir9.s4���	����r9c
@sHeZdZdZejZdefdee	j
ee�e	j
�fdefde
jdfde
jdfed	�d
efgdefde
jd
fde
jdfgdeeee�e�dfdeeee�e�dfdedfgdefde
jd
fde
jdfde
jdfgdedfdedfdedfgdedfed�defgdedfed�defgdefed	�gdee	j
ee�e	j
�fde
jfgd�	ZdS) �GenshiMarkupLexerzX
    Base lexer for Genshi markup, used by `HtmlGenshiLexer` and
    `GenshiLexer`.
    z[^<$]+z(<\?python)(.*?)(\?>)z'<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>z<\s*py:[a-zA-Z0-9]+�pytagz<\s*[a-zA-Z0-9:.]+r|r�z[<$]r�z[\w:-]+\s*=�pyattrr�r�z(")(.*?)(")z(')(.*?)(')r�z
py:[\w-]+\s*=r��"�attr-dstring�'�attr-sstringz[^\s>]*�stringsz[^"'$]+r�z(?<!\$)(\$)([a-zA-Z_][\w\.]*))	r�r�r�r|r�r�r�r�r�N)r�r�r�r�r�r�r�r rrrtrrrr�rrr�rr�rxrhrhrhrir�Qs`�

�

��


���������r�csBeZdZdZdZddgZgd�ZdgZ�fdd�Zd	d
�Z	�Z
S)r8z�
    A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ and
    `kid <http://kid-templating.org/>`_ kid HTML templates.
    zHTML+Genshizhtml+genshizhtml+kid�r��*.htm�*.xhtmlztext/html+genshicst�jttfi|��dSr�)r�rerr�r�r�rhrire�szHtmlGenshiLexer.__init__cCsFd}t�d|�dur|d7}t�d|�dur4|d7}|t�|�dS�Nr�z	\$\{.*?\}皙�����?zpy:(.*?)=["\']r�)r�r�rr�r�rhrhrir��szHtmlGenshiLexer.analyse_textr�rhrhr�rir8�sr8csHeZdZdZdZgd�ZdgZdgZddgZ�fdd	�Z	d
d�Z
�ZS)r7z�
    A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ and
    `kid <http://kid-templating.org/>`_ kid XML templates.
    ZGenshi)ZgenshiZkidz
xml+genshizxml+kidz*.kidr�zapplication/x-genshizapplication/x-kidcst�jttfi|��dSr�)r�rerr�r�r�rhrire�szGenshiLexer.__init__cCsFd}t�d|�dur|d7}t�d|�dur4|d7}|t�|�dSr�)r�r�rr�r�rhrhrir��szGenshiLexer.analyse_text�r�r�r�r�r�r�r�r�r�rer�r�rhrhr�rir7�sr7csBeZdZdZdZgd�ZdgZgd�Z�fdd�Zdd	�Z	�Z
S)
r;zK
    A lexer that highlights javascript code in genshi text templates.
    zJavaScript+Genshi Text)z
js+genshitextz	js+genshizjavascript+genshitextzjavascript+genshi�*.js)zapplication/x-javascript+genshiztext/x-javascript+genshiztext/javascript+genshicst�jttfi|��dSr�)r�rerr9r�r�rhrire�szJavascriptGenshiLexer.__init__cCst�|�dS�N皙�����?�r7r�rrhrhrir��sz"JavascriptGenshiLexer.analyse_textr�rhrhr�rir;�sr;cs@eZdZdZdZddgZdgZdgZ�fdd�Zd	d
�Z	�Z
S)r:zK
    A lexer that highlights CSS definitions in genshi text templates.
    zCSS+Genshi Textzcss+genshitextz
css+genshi�*.cssztext/css+genshicst�jttfi|��dSr�)r�rerr9r�r�rhrire�szCssGenshiLexer.__init__cCst�|�dSr�r�rrhrhrir��szCssGenshiLexer.analyse_textr�rhrhr�rir:�sr:csHeZdZdZdZgd�ZdgZgd�ZdgZ�fdd�Z	d	d
�Z
�ZS)r)z�
    Subclass of the ERB lexer that highlights the unlexed data with the
    html lexer.

    Nested Javascript and CSS is highlighted too.
    ZRHTML)Zrhtmlzhtml+erbz	html+rubyz*.rhtmlr�ztext/html+rubycst�jttfi|��dSr�)r�rerr(r�r�rhrire�szRhtmlLexer.__init__cCs"t�|�d}t|�r|d7}|S�Nr�g�?)r(r�r"r�rhrhrir��szRhtmlLexer.analyse_textr�rhrhr�rir)�sr)cs@eZdZdZdZddgZdgZdgZ�fdd�Zd	d
�Z	�Z
S)r*zo
    Subclass of `ErbLexer` which highlights data outside preprocessor
    directives with the `XmlLexer`.
    zXML+Rubyzxml+rubyzxml+erbr�zapplication/xml+rubycst�jttfi|��dSr�)r�rerr(r�r�rhrire	szXmlErbLexer.__init__cCs"t�|�d}t|�r|d7}|Sr�)r(r�r#r�rhrhrir�szXmlErbLexer.analyse_textr�rhrhr�rir*�sr*cs@eZdZdZdZddgZdgZdgZ�fdd�Zd	d
�Z	�Z
S)r+zS
    Subclass of `ErbLexer` which highlights unlexed data with the `CssLexer`.
    zCSS+Rubyzcss+rubyzcss+erbr�z
text/css+rubycst�jttfi|��dSr�)r�rerr(r�r�rhrireszCssErbLexer.__init__cCst�|�dSr��r(r�rrhrhrir� szCssErbLexer.analyse_textr�rhrhr�rir+sr+csBeZdZdZdZgd�ZdgZgd�Z�fdd�Zdd	�Z	�Z
S)
r,z^
    Subclass of `ErbLexer` which highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Ruby)zjavascript+rubyzjs+rubyzjavascript+erbzjs+erbr�)zapplication/x-javascript+rubyztext/x-javascript+rubyztext/javascript+rubycst�jttfi|��dSr�)r�rerr(r�r�rhrire1szJavascriptErbLexer.__init__cCst�|�dSr�r�rrhrhrir�4szJavascriptErbLexer.analyse_textr�rhrhr�rir,$sr,csHeZdZdZdZdgZdgZgd�Zgd�Z�fdd�Z	d	d
�Z
�ZS)r$z�
    Subclass of `PhpLexer` that highlights unhandled data with the `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+PHPzhtml+phpz*.phtml)�*.phpr�r�r��
*.php[345])zapplication/x-phpzapplication/x-httpd-phpzapplication/x-httpd-php3zapplication/x-httpd-php4zapplication/x-httpd-php5cst�jttfi|��dSr�)r�rerrr�r�rhrireHszHtmlPhpLexer.__init__cCs"t�|�d}t|�r|d7}|Sr�)rr�r"r�rhrhrir�KszHtmlPhpLexer.analyse_textr�rhrhr�rir$8sr$cs@eZdZdZdZdgZgd�ZdgZ�fdd�Zdd	�Z	�Z
S)
r%zT
    Subclass of `PhpLexer` that highlights unhandled data with the `XmlLexer`.
    zXML+PHPzxml+php)r�r�r�zapplication/xml+phpcst�jttfi|��dSr�)r�rerrr�r�rhrire\szXmlPhpLexer.__init__cCs"t�|�d}t|�r|d7}|Sr�)rr�r#r�rhrhrir�_szXmlPhpLexer.analyse_textr�rhrhr�rir%Rsr%cs>eZdZdZdZdgZdgZdgZ�fdd�Zdd	�Z	�Z
S)
r&zU
    Subclass of `PhpLexer` which highlights unmatched data with the `CssLexer`.
    zCSS+PHPzcss+phpr�ztext/css+phpcst�jttfi|��dSr�)r�rerrr�r�rhrirepszCssPhpLexer.__init__cCst�|�dSr��rr�rrhrhrir�sszCssPhpLexer.analyse_textr�rhrhr�rir&fsr&csBeZdZdZdZddgZdgZgd�Z�fdd�Zd	d
�Z	�Z
S)r'z`
    Subclass of `PhpLexer` which highlights unmatched data with the
    `JavascriptLexer`.
    zJavaScript+PHPzjavascript+phpzjs+phpr�)zapplication/x-javascript+phpztext/x-javascript+phpztext/javascript+phpcst�jttfi|��dSr�)r�rerrr�r�rhrire�szJavascriptPhpLexer.__init__cCs
t�|�Sr�r�rrhrhrir��szJavascriptPhpLexer.analyse_textr�rhrhr�rir'wsr'cs@eZdZdZdZdgZgd�ZdgZ�fdd�Zdd	�Z	�Z
S)
r.z�
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+Smartyzhtml+smarty)r�r�r�r�ztext/html+smartycst�jttfi|��dSr�)r�rerr-r�r�rhrire�szHtmlSmartyLexer.__init__cCs"t�|�d}t|�r|d7}|Sr�)r-r�r"r�rhrhrir��szHtmlSmartyLexer.analyse_textr�rhrhr�rir.�sr.cs@eZdZdZdZdgZddgZdgZ�fdd�Zd	d
�Z	�Z
S)r/z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `XmlLexer`.
    z
XML+Smartyz
xml+smartyr�r�zapplication/xml+smartycst�jttfi|��dSr�)r�rerr-r�r�rhrire�szXmlSmartyLexer.__init__cCs"t�|�d}t|�r|d7}|Sr�)r-r�r#r�rhrhrir��szXmlSmartyLexer.analyse_textr�rhrhr�rir/�sr/cs@eZdZdZdZdgZddgZdgZ�fdd�Zd	d
�Z	�Z
S)r0z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `CssLexer`.
    z
CSS+Smartyz
css+smartyr�r�ztext/css+smartycst�jttfi|��dSr�)r�rerr-r�r�rhrire�szCssSmartyLexer.__init__cCst�|�dSr��r-r�rrhrhrir��szCssSmartyLexer.analyse_textr�rhrhr�rir0�sr0csDeZdZdZdZddgZddgZgd�Z�fdd	�Zd
d�Z	�Z
S)r1zd
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Smartyzjavascript+smartyz	js+smartyr�r�)zapplication/x-javascript+smartyztext/x-javascript+smartyztext/javascript+smartycst�jttfi|��dSr�)r�rerr-r�r�rhrire�szJavascriptSmartyLexer.__init__cCst�|�dSr�r�rrhrhrir��sz"JavascriptSmartyLexer.analyse_textr�rhrhr�rir1�sr1csDeZdZdZdZgd�Zgd�ZddgZ�fdd�Zd	d
�Z	�Z
S)r3z�
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+Django/Jinja)zhtml+djangoz
html+jinjaZ
htmldjangor�ztext/html+djangoztext/html+jinjacst�jttfi|��dSr�)r�rerr2r�r�rhrire�szHtmlDjangoLexer.__init__cCs"t�|�d}t|�r|d7}|Sr�)r2r�r"r�rhrhrir��szHtmlDjangoLexer.analyse_textr�rhrhr�rir3�sr3csBeZdZdZdZddgZdgZddgZ�fdd	�Zd
d�Z	�Z
S)r5z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `XmlLexer`.
    zXML+Django/Jinjaz
xml+djangoz	xml+jinjar�zapplication/xml+djangozapplication/xml+jinjacst�jttfi|��dSr�)r�rerr2r�r�rhrire�szXmlDjangoLexer.__init__cCs"t�|�d}t|�r|d7}|Sr�)r2r�r#r�rhrhrir�szXmlDjangoLexer.analyse_textr�rhrhr�rir5�sr5csBeZdZdZdZddgZdgZddgZ�fdd	�Zd
d�Z	�Z
S)r4z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `CssLexer`.
    zCSS+Django/Jinjaz
css+djangoz	css+jinjar�ztext/css+djangoztext/css+jinjacst�jttfi|��dSr�)r�rerr2r�r�rhrireszCssDjangoLexer.__init__cCst�|�dSr��r2r�rrhrhrir�szCssDjangoLexer.analyse_textr�rhrhr�rir4	sr4csBeZdZdZdZgd�ZdgZgd�Z�fdd�Zdd	�Z	�Z
S)
r6zd
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Django/Jinja)zjavascript+djangoz	js+djangozjavascript+jinjazjs+jinjar�)zapplication/x-javascript+djangozapplication/x-javascript+jinjaztext/x-javascript+djangoztext/x-javascript+jinjaztext/javascript+djangoztext/javascript+jinjacst�jttfi|��dSr�)r�rerr2r�r�rhrire,szJavascriptDjangoLexer.__init__cCst�|�dSr�r�rrhrhrir�/sz"JavascriptDjangoLexer.analyse_textr�rhrhr�rir6sr6c@sFeZdZdZdedfdefdefdefgdedfd	ee�fgd
�ZdS)�JspRootLexerzt
    Base for the `JspLexer`. Yields `Token.Other` for area outside of
    JSP tags.

    .. versionadded:: 0.7
    �<%\S?�seczC</?jsp:(forward|getProperty|include|plugin|setProperty|useBean).*?>�[^<]+�<rnr��[\w\W]+?(?=%>|\Z)�r�rN)	r�r�r�r�rr rr
rxrhrhrhrir�3s	��	
��r�cs>eZdZdZdZdgZdgZdgZ�fdd�Zdd	�Z	�Z
S)
rGzA
    Lexer for Java Server Pages.

    .. versionadded:: 0.7
    zJava Server PageZjspz*.jspzapplication/x-jspcst�jttfi|��dSr��r�rerr�r�r�rhrireWszJspLexer.__init__cCs:t�|�d}t|�r|d7}d|vr6d|vr6|d7}|S�Nr�r~rmrnr�)r
r�r#r�rhrhrir�ZszJspLexer.analyse_text�r�r�r�r�r�r�r�r�rer�r�rhrhr�rirGLsrGc@s�eZdZdZdZdgZdgZdgZej	Z
defdej
dfd	efd
ej
fdeeejedee�fd
eeejedeee�e�fdeeejedee�e�fdeeej�fdeedee�ejdde�fdefg
dej
fdej
dfdej
dfdej
fgd�Zdd�ZdS)rLzR
    For files using the Evoque templating system.

    .. versionadded:: 1.1
    ZEvoqueZevoquez*.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	cCsd|vrdSdS)z.Evoque templates use $evoque, which is unique.z$evoquerjNrhrrhrhrir��szEvoqueLexer.analyse_text)r�r�r�r�r�r�r�r�r�r�r�r rr�rrrr�rrrrxr�rhrhrhrirLcsP
��
����
���

��'rLcs>eZdZdZdZdgZdgZdgZ�fdd�Zdd	�Z	�Z
S)
rMzy
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 1.1
    zHTML+Evoquezhtml+evoquer�ztext/html+evoquecst�jttfi|��dSr�)r�rerrLr�r�rhrire�szEvoqueHtmlLexer.__init__cCs
t�|�Sr��rLr�rrhrhrir��szEvoqueHtmlLexer.analyse_textrrhrhr�rirM�srMcs>eZdZdZdZdgZdgZdgZ�fdd�Zdd	�Z	�Z
S)
rNzx
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `XmlLexer`.

    .. versionadded:: 1.1
    z
XML+Evoquez
xml+evoquer�zapplication/xml+evoquecst�jttfi|��dSr�)r�rerrLr�r�rhrire�szEvoqueXmlLexer.__init__cCs
t�|�Sr�rrrhrhrir��szEvoqueXmlLexer.analyse_textrrhrhr�rirN�srNc@s�eZdZdZdZdgZgZgZej	Z
dejfdej
fdefdefdefd	efd
efdefdefd
ejdfdejfdefdefdejfdejfdeejee�fdejfdefdefgdejfdejfdejfdejfd
ejdfgd�ZdS)rOz
    Coldfusion statements
    ZcfstatementZcfsz//.*?\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�r�rrr�rrr�rrr�rrr�ZInterprxrhrhrhrirO�sN
����
��rOc
@s�eZdZdZdZdgZgZgZdefe	d�defgde
jdfd	e
fd
ej
dfdeej
ee�ej
�fd
eej
ee�ej
�fgdefdeeee�e�fdej
dfe	d�defdefgde
jdfde
jdfde
jfgd�ZdS)�ColdfusionMarkupLexerz 
    Coldfusion markup only
    Z
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�rrrN)r�r�r�r�r�r�r�r�r rrr�rr�rrrOrrxrhrhrhrir�sB�

����
�

��rcs8eZdZdZdZdgZddgZdgZ�fdd�Z�Z	S)	rPz#
    Coldfusion markup in html
    zColdfusion HTMLZcfmz*.cfmz*.cfmlzapplication/x-coldfusioncst�jttfi|��dSr�)r�rerrr�r�rhrire)szColdfusionHtmlLexer.__init__�
r�r�r�r�r�r�r�r�rer�rhrhr�rirP srPcs4eZdZdZdZdgZdgZgZ�fdd�Z�Z	S)rQzH
    Coldfusion markup/script components

    .. versionadded:: 2.0
    zColdfusion CFCZcfcz*.cfccst�jttfi|��dSr�)r�rerPrOr�r�rhrire8szColdfusionCFCLexer.__init__rrhrhr�rirQ-srQcs>eZdZdZdZdgZdgZdgZ�fdd�Zdd	�Z	�Z
S)
rUzD
    Lexer for Scalate Server Pages.

    .. versionadded:: 1.4
    zScalate Server PageZsspz*.sspzapplication/x-sspcst�jttfi|��dSr�rr�r�rhrireGszSspLexer.__init__cCsDd}t�d|�r|d7}t|�r(|d7}d|vr@d|vr@|d7}|S)Nr�zval \w+\s*:g333333�?r�rmrnr�)r�r�r#r�rhrhrir�JszSspLexer.analyse_textrrhrhr�rirU<srUc@s@eZdZdZdedfdefdefgdedfdee�fgd	�Zd
S)�TeaTemplateRootLexerz
    Base for the `TeaTemplateLexer`. Yields `Token.Other` for area outside of
    code blocks.

    .. versionadded:: 1.5
    rrrrrnr�rrN)	r�r�r�r�rr rrrxrhrhrhrirUs	�
��rcs>eZdZdZdZdgZdgZdgZ�fdd�Zdd	�Z	�Z
S)
rVzW
    Lexer for `Tea Templates <http://teatrove.org/>`_.

    .. versionadded:: 1.5
    ZTeaZteaz*.teaz
text/x-teacst�jttfi|��dSr�)r�rerrr�r�rhrirevszTeaTemplateLexer.__init__cCs:t�|�d}t|�r|d7}d|vr6d|vr6|d7}|Sr)rr�r#r�rhrhrir�yszTeaTemplateLexer.analyse_textrrhrhr�rirVksrVcsBeZdZdZdZdgZgd�Zgd�Z�fdd�Zdd	�Z	�Z
S)
rWz�
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `HtmlLexer`.

    Nested JavaScript and CSS is also highlighted.

    .. versionadded:: 1.6
    z
HTML+Lassoz
html+lasso)r�r�r��*.lasso�*.lasso[89]�*.incl�*.inc�*.las)ztext/html+lassozapplication/x-httpd-lassozapplication/x-httpd-lasso[89]cst�jttfi|��dSr�)r�rerrr�r�rhrire�szLassoHtmlLexer.__init__cCs"t�|�d}t|�r|d7}|Sr�)rr�r"r�rhrhrir��szLassoHtmlLexer.analyse_textr�rhrhr�rirW�s	rWcs@eZdZdZdZdgZgd�ZdgZ�fdd�Zdd	�Z	�Z
S)
rXzz
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `XmlLexer`.

    .. versionadded:: 1.6
    z	XML+Lassoz	xml+lasso)r�rrrrrzapplication/xml+lassocst�jttfi|��dSr�)r�rerrr�r�rhrire�szLassoXmlLexer.__init__cCs"t�|�d}t|�r|d7}|Sr�)rr�r#r�rhrhrir��szLassoXmlLexer.analyse_textr�rhrhr�rirX�srXcs>eZdZdZdZdgZdgZdgZ�fdd�Zdd	�Z	�Z
S)
rYzz
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `CssLexer`.

    .. versionadded:: 1.6
    z	CSS+Lassoz	css+lassor�ztext/css+lassocs"d|d<t�jttfi|��dS�NTZrequiredelimiters)r�rerrr�r�rhrire�szLassoCssLexer.__init__cCs6t�|�d}t�d|�r"|d7}d|vr2|d7}|S)Nr�z
\w+:[^;]+;r�zpadding:)rr�r�r�r�rhrhrir��szLassoCssLexer.analyse_textr�rhrhr�rirY�srYcsBeZdZdZdZddgZdgZgd�Z�fdd�Zd	d
�Z	�Z
S)rZz�
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `JavascriptLexer`.

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

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

    .. versionadded:: 2.0
    Z
HandlebarsZ
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��ryz[\w-]+z[()/@a-zA-Z][\w-]*z\.[\w-]+z(this\/|\.\/|(\.\.\/)+)[\w-]+r�r�r�)r�r|rr�rN)r�r�r�r�r�r�r rr�Specialrrtrr�rrrr�rrrrr�rr�r�rxrhrhrhrir[�sZ	��
���
��
����r[cs:eZdZdZdZdgZddgZddgZ�fdd	�Z�Z	S)
r\z}
    Subclass of the `HandlebarsLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    zHTML+Handlebarszhtml+handlebarsz*.handlebarsz*.hbsztext/html+handlebarsztext/x-handlebars-templatecst�jttfi|��dSr�)r�rerr[r�r�rhrireAszHandlebarsHtmlLexer.__init__rrhrhr�rir\4sr\cs:eZdZdZdZgd�ZdgZddgZ�fdd�Z�Z	S)	r]z�
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `YamlLexer`.

    Commonly used in Saltstack salt states.

    .. versionadded:: 2.0
    z
YAML+Jinja)z
yaml+jinjaZsaltZslsz*.slsztext/x-yaml+jinjaz
text/x-slscst�jttfi|��dSr�)r�rerr2r�r�rhrireTszYamlJinjaLexer.__init__rrhrhr�rir]Es	r]c@sjeZdZdZdZdgZdgZdefdee	e
�dfdee	e
eedd	��d
fdefgde
jd
fdee
je
�eddd�fdee
je
e	�dfdeeje
eedd	�e
e	�dfdeeje
e	�dfdeeje
e	�dfdee
jde
e	�dfdeejde
e	�dfdeeje
eedd	�e	e
�dfdeeje
�dfg
ed�d e	dfd!e	d"fged�d e	d#fd$eeje	e
�d%fgd!e	dfed&�ed'�ged�ed�d(eeedd	�e
ee
eedd	�e
e	�fd)efd*ejfd+eeedd	�e
eje
eedd	��fed�ed�ged�ed,�gd-ee
ede
�dfd.ee
eje
�dfgd e	dfgd/e	d#fgd0e
dfged�d1eeje
e�fd2ee	e
eedd	�e
e	�fed3�ed4�ed5�d6e	fged7�d8efged7�ed�d8efgd/e	d#fed'�gd/e	d#fed9�gd:e
jfgd;ejfd<e	fgd=ejfd>ejfgd?ejfd@ejfged5�ed3�ed4�ed�gdAe
fgdBee	e
eje
e	�d#fd8efgdefdCee	e
eje
e	�dfdefgdD�Z dS)Er^zw
    Lexer for `Liquid templates
    <http://www.rubydoc.info/github/Shopify/liquid>`_.

    .. versionadded:: 2.0
    Zliquidz*.liquidr�z
(\{%)(\s*)�tag-or-blockz(\{\{)(\s*)([^\s}]+)rr�outputr�z(if|unless|elsif|case)(?=\s+)�	conditionz(when)(\s+)�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*)�variable-tag-markupz([^\s%]+)(\s*)�
tag-markup�\}\}z\|�filters)r�r�z([^\s|:]+)(:?)(\s*)�
filter-markup�
end-of-tag�default-param-markupz/([^\s=!><]+)(\s*)([=!><]=?)(\s*)(\S+)(\s*)(%\})z\b!z\bnot\bz*([\w.\'"]+)(\s+)(contains)(\s+)([\w.\'"]+)�end-at-whitespacez(\s*)((=|!|>|<)=?)(\s*)z(\s*)(\bcontains\b)(\s*)z%\}r�z([^\s=:]+)(\s*)(=|:)z(\{\{)(\s*)([^\s}])(\s*)(\}\})r�number�keyword�,�param-markupr��variable-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!r"r*r+r#z
generic-value�operatorr,r$r.r2r-r3r(r'r0r�rr/rr%r	r&)!r�r�r�r�r�r�r�rrrrrrrZReservedrrr�rr�rZWordr�r�r�rr�r�rZFloatZIntegerrrxrhrhrhrir^Xs:��

�����������"���	�����������������������������������r^c@s�eZdZdZdZdgZdgZejej	BZ
dZdZdedZ
ee
Zd	efd
ejdfdefd
eejeeeejeejeeeej�fdeejeeeejeejeeeej�fdeeejeeeej�dfdeejee�dfdefgdeeeeej�fdeeeeeeej�fdejfdefdejfeejfdeejfdefdejfdejfdefdefgdefdeeej�d fed!�gdefd"eeej�d fed!�d#e fgd$�Z!d%S)&r_z�
    `Twig <http://twig.sensiolabs.org/>`_ template lexer.

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

    .. versionadded:: 2.0
    ZTwigZtwigzapplication/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�Z_ident_charZ_ident_beginZ
_ident_endZ_ident_innerr rrtrrrrr�rr�r�r�rrr�r�rrrxrhrhrhrir_&s�	
���������������r_cs6eZdZdZdZdgZdgZdgZ�fdd�Z�Z	S)r`zw
    Subclass of the `TwigLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    z	HTML+Twigz	html+twigz*.twigztext/html+twigcst�jttfi|��dSr�)r�rerr_r�r�rhrire�szTwigHtmlLexer.__init__rrhrhr�rir`ysr`c@s�eZdZdZdZdgZdefdeej	e
�dfdeeej
ee
ee
�dfd	eeej
ee
�fd
eeej
e
ee
�dfdeeej
e
�fgde
fd
ej	dfdejfdejfdejfdefdejfdejfdeee
ee
ee
ee
�fg	dedfdedfdedfgd�ZdS)raad
    Generic
    `angular2 <http://victorsavkin.com/post/119943127151/angular-2-template-syntax>`_
    template lexer.

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

    .. versionadded:: 2.1
    ZAngular2Zng2z	[^{([*#]+r�ngExpressionz&([([]+)([\w:.-]+)([\])]+)(\s*)(=)(\s*)r�z([([]+)([\w:.-]+)([\])]+)(\s*)z([*#])([\w:.-]+)(\s*)(=)(\s*)z([*#])([\w:.-]+)(\s*)z\s+(\|\s+)?r)r�z:?(true|false)r�r�r�z[a-zA-Z][\w-]*(\(.*\))?z\.[\w-]+(\(.*\))?z-(\?)(\s*)([^}\s]+)(\s*)(:)(\s*)([^}\s]+)(\s*)r�r�r�)r�r5r�N)r�r�r�r�r�r�r rrrtrrrr�rrZBooleanr�r�rr�rxrhrhrhrira�sL�����
�����racs0eZdZdZdZdgZdgZ�fdd�Z�ZS)rbz{
    Subclass of the `Angular2Lexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    zHTML + Angular2zhtml+ng2z*.ng2cst�jttfi|��dSr�)r�rerrar�r�rhrire�szAngular2HtmlLexer.__init__)	r�r�r�r�r�r�r�rer�rhrhr�rirb�s
rb)tr�r�Zpygments.lexers.htmlrrZpygments.lexers.javascriptrrZpygments.lexers.cssrZpygments.lexers.phprZpygments.lexers.pythonrZpygments.lexers.perlr	Zpygments.lexers.jvmr
rZpygments.lexers.datarZpygments.lexerr
rrrrrrrrZpygments.tokenrrrrrrrrrrr r!Z
pygments.utilr"r#�__all__r(r-rRrSrTr2r<r=r>r@r?rArBrCrDrErFr�rHrIrJrKr9r�r8r7r;r:r)r*r+r,r$r%r&r'r.r/r0r1r3r5r4r6r�rGrLrMrNrOrrPrQrUrrVrWrXrYrZr[r\r]r^r_r`rarbrhrhrhri�<module>s�
,8_8RS08D
,#@90.
LOS@

Youez - 2016 - github.com/yon3zu
LinuXploit