
    ,h'                       d Z ddlZddlmZmZ ddlmZmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZmZ dd
lmZ ddlmZ ddlmZmZmZmZmZmZmZmZm Z  ddl!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- ddl.m/Z/m0Z0 g dZ1 G d de      Z2 G d de      Z3 G d de      Z4 G d de      Z5 G d de      Z6 G d de      Z7 G d de      Z8 G d de      Z9 G d  d!e      Z: G d" d#e      Z; G d$ d%e      Z< G d& d'e      Z= G d( d)e      Z> G d* d+e      Z? G d, d-e      Z@ G d. d/e      ZA G d0 d1e      ZB G d2 d3e      ZC G d4 d5e      ZD G d6 d7e      ZE G d8 d9e      ZF G d: d;e      ZG G d< d=e      ZH G d> d?e      ZI G d@ dAe      ZJ G dB dCe      ZK G dD dEe      ZL G dF dGe      ZM G dH dIe      ZN G dJ dKe      ZO G dL dMe      ZP G dN dOe      ZQ G dP dQe      ZR G dR dSe      ZS G dT dUe      ZT G dV dWe      ZU G dX dYe      ZV G dZ d[e      ZW G d\ d]e      ZX G d^ d_e      ZY G d` dae      ZZ G db dce      Z[ G dd dee      Z\ G df dge      Z] G dh die      Z^ G dj dke      Z_ G dl dme      Z` G dn doe      Za G dp dqe      Zb G dr dse      Zc G dt due      Zd G dv dwe      Ze G dx dye      Zf G dz d{e      Zg G d| d}e      Zh G d~ de      Zi G d de      Zj G d de      Zk G d de      Zl G d de      Zm G d de      Zn G d de      Zo G d de      Zp G d de      Zq G d de      Zr G d de      Zs G d de      Zt G d de      Zu G d de      Zvy)z
    pygments.lexers.templates
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for various template engines' markup.

    :copyright: Copyright 2006-2025 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                   t    e Zd ZdZdZdZdgZdgZdZ e	j                  de	j                        Zd Zd	 Zd
 Zy)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`.
    ERBhttps://github.com/ruby/erberbzapplication/x-ruby-templating z*(<%%|%%>|<%=|<%#|<%-|<%|-%>|%>|^%[^%].*?$)c                 V    ddl m}  |di || _        t        j                  | fi | y )Nr   )	RubyLexer )pygments.lexers.rubyrl   
ruby_lexerr   __init__)selfoptionsrl   s      [/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/pygments/lexers/templates.pyrp   zErbLexer.__init__E   s%    2#.g.t'w'    c              #   j  K   | j                   j                  |      }|j                          dx}}	 	 |dk(  r-|j                         }|t        |f |t        |      z  }d}n|dk(  rl|j                         }|dv r|t        |f |dz  }d}n|dk(  rH|t        j                  |f |j                         }|dz   t        |f |dt        |      z   z  }d}nA|dv rt|t        j                  |f |t        |      z  }|j                         }d}| j                  j                  |      D ]  \  }}	}
||z   |	|
f  |t        |      z  }d}n|dv r|t        |f |t        |      z  }d}n|t        j                  |d   f d}| j                  j                  |dd	       D ]  \  }}	}
|dz   |z   |	|
f  |t        |      z  }d}nJ|dk(  rE|j                         }|dvr|t        |f n|t        j                  |f |t        |      z  }d}# t        $ r Y y	w xY w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   Preprocro   get_tokens_unprocessedr   
IndexError)rq   texttokensstateidxvaltagdatar_idxr_tokenr_values              rs   r   zErbLexer.get_tokens_unprocessedJ   se     %%d+9	A: **,Cuc/)3s8OCEaZ **,Cn,!5#o-q !!7??C77$jjl!Agw33q3s8|+ ! 44!7??C77s3x%zz| ! $ F Ft L@3E7G"'#+w"??@ s4y( !-!5#o-s3x ! "7??CF:: ! $ F Fs12w OD3E7G"%'E/7G"CCD s3x !aZ **,C-/!5#o-!7??C773s8OCEm n  		s#   0H3G1H$ $	H0-H3/H00H3c                     d| v rd| v ryy y )Nry   rz   皙?rm   r   s    rs   analyse_textzErbLexer.analyse_text   s    4<DDL )<rt   N)__name__
__module____qualname____doc__nameurlaliases	mimetypesversion_addedrecompileMr{   rp   r   r   rm   rt   rs   r*   r*   3   sO     D
'CgG01IM

H"$$OI(
BHrt   r*   c                   D   e Zd ZdZdZdZdgZdgZdgZdZ	e
j                  e
j                  z  Zdefd	 eej"                  eej"                        fd
 eej"                   eed      ej"                        fd eej"                  ej*                  e      dfdej"                  dfgdefdej"                  dfdej"                  dfdej.                  fdej.                  fdefdej4                  fdefdej:                  fdej<                  fdej>                  fgdZ d Z!y)r/   z
    Generic Smarty template lexer.

    Just highlights smarty code between the preprocessor directives, other
    data is left untouched by the lexer.
    Smartyhttps://www.smarty.net/smarty*.tplzapplication/x-smartyrj   [^{]+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}t        j                  d|       r|dz  }t        j                  d|       r|dz  }t        j                  d|       r|dz  }t        j                  d|       r|dz  }|S )N        z\{if\s+.*?\}.*?\{/if\}333333?z\{include\s+file=.*?\}z \{foreach\s+.*?\}.*?\{/foreach\}z	\{\$.*?\}{Gz?r   searchr   rvs     rs   r   zSmartyLexer.analyse_text   sk    99.5$JB99.5$JB998$?$JB99\4($JB	rt   N)"r   r   r   r   r   r   r   	filenamesr   r   r   	MULTILINEDOTALLflagsr"   r   r   r   r   r   r   Functionr   Variabler   r   Constantr!   r    DoubleSingle	Attributer   r   rm   rt   rs   r/   r/      sV    D
#CjG	I'(IMLL299$E u!goow@B(goouX4'Hoo'( *goot}}d;XGGOOX.

 TNGOOW-GOOV,.&6+X6#W%5%56'(.0(&--8(&--8dnn-
F8
rt   r/   c                      e Zd ZdZdZdZdgZddgZdZe	j                  e	j                  z  ZdZd	efd
 eej"                  eej"                        fd eej"                  e      fdez   dz    eej"                  ej&                  ej"                  e      dfdez   dz    eej"                  ej&                  ej"                        fdedfgeej*                  fdedfdez   dz    eeej*                        dfdedf ed      gdefdedfdez   dz   ej&                  f ed      gdef ed      dedfgdedfdefd efd!ej6                  fd"ej8                  fd#efd$efd%ej>                  fdedfd&edfd'edfdedfdedfdedfgd(Z d) Z!y*)+rT   z
    Generic Velocity template lexer.

    Just highlights velocity directives and variable references, other
    data is left untouched by the lexer.
    Velocityhttps://velocity.apache.org/velocity*.vm*.fhtmlrj   r   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   z0[xX][0-9a-fA-F]+[Ll]?z
\b[0-9]+\br   \)r   )r   r   r   r   r   c                 <   d}t        j                  d| t         j                        r|dz  }t        j                  d| t         j                        r|dz  }t        j                  d| t         j                        r|dz  }t        j                  d|       r|dz  }|S )	Nr   z #\{?macro\}?\(.*?\).*?#\{?end\}?      ?z#\{?if\}?\(.+?\).*?#\{?end\}?r   z"#\{?foreach\}?\(.+?\).*?#\{?end\}?z6\$!?\{?[a-zA-Z_]\w*(\([^)]*\))?(\.\w+(\([^)]*\))?)*\}?r   r   r   r   r   s     rs   r   zVelocityLexer.analyse_text  s    998$		J$JB995tRYYG$JB99:D"))L$JB99 0157$JB	rt   N)"r   r   r   r   r   r   r   r   r   r   r   r   r   
identifierr"   r   r   r   r   r   r   r   r   r   r   r   r    r   r   r!   r   r   r   r   rm   rt   rs   rT   rT      s5    D
(ClG#IMLL299$E J goow@Bgoow/1*$'77goot}}goo{S  *${2goot}}gooFHj1
 'K.
"T)k4==17<K(FO
 NHo.Z%'7L!
 hL!Hf%
 j1TNk"(&--8(&--8&/F##W%5%56K)K(K)K(K)K(
E2Fhrt   rT   c                   B     e Zd ZdZdZdgZdZddgZdgZdZ	 fd	Z
 xZS )
rU   za
    Subclass of the `VelocityLexer` that highlights unlexed data
    with the `HtmlLexer`.

    zHTML+Velocityzhtml+velocityrj   *.htmlr   ztext/html+velocityr   c                 8    t        |   t        t        fi | y N)superrp   r   rT   rq   rr   	__class__s     rs   rp   zVelocityHtmlLexer.__init__/      M=W=rt   )r   r   r   r   r   r   r   alias_filenamesr   r   rp   __classcell__r   s   @rs   rU   rU   !  s=     DGM+O%&I
(C> >rt   rU   c                   H     e Zd ZdZdZdgZdZddgZdgZdZ	 fd	Z
d
 Z xZS )rV   z`
    Subclass of the `VelocityLexer` that highlights unlexed data
    with the `XmlLexer`.

    zXML+Velocityzxml+velocityrj   *.xmlr   zapplication/xml+velocityr   c                 8    t        |   t        t        fi | y r   )r   rp   r   rT   r   s     rs   rp   zVelocityXmlLexer.__init__A  s    =<G<rt   c                 V    t         j                  |       dz
  }t        |       r|dz  }|S Nr   r   )rT   r   r%   r   s     rs   r   zVelocityXmlLexer.analyse_textD  s-    ''-4$#IB	rt   r   r   r   r   r   r   r   r   r   r   rp   r   r   r   s   @rs   rV   rV   3  s=     DGM'O+,I
(C=rt   rV   c                      e Zd ZdZdZddgZddgZdZdZe	j                  e	j                  z  Zd	efd
ej                  dfdefd eej                  eeeej                  eej                  eeeej                        fd eej                  eeeej                  eej                  eeeej                        fd eej                  eeeej(                        dfd eej                  ee      dfdefgd eeeej(                        fd eeeeeej(                        fdej,                  fdefdej.                  fdej0                  fdej0                  fdej4                  fdej6                  fdefdefgdefd eeej                        d f ed!      gdefd" eeej                        d f ed!      d#efgd$Zd% Z y&)'r4   a  
    Generic `Django <https://www.djangoproject.com/documentation/templates/>`_
    and `Jinja <https://jinja.palletsprojects.com>`_ template lexer.

    It just highlights django/jinja code between the preprocessor directives,
    other data is left untouched by the lexer.
    zDjango/Jinjadjangojinjazapplication/x-django-templatingzapplication/x-jinja5https://www.djangoproject.com/documentation/templatesrj   r   \{\{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}t        j                  d|       |dz  }t        j                  d|       |dz  }t        j                  d|       |dz  }|S )Nr   z\{%\s*(block|extends)r   z\{%\s*if\s*.*?%\}皙?z\{\{.*?\}\}r   r   s     rs   r   zDjangoLexer.analyse_text  s\    99-t4@#IB99)40<#IB99^T*6#IB	rt   N)!r   r   r   r   r   r   r   r   r   r   r   Sr   r"   r   r   r   r   r   r   r   r   PseudoBuiltinr   r    r   r   r!   r   r   r   r   rm   rt   rs   r4   r4   K  s5    D!G24IJI
ACMDD244KE ugoou-7#5gootWdGOOwgtoo'(1gootWdGOOGOOT7Doo'( 8gootWdDMMJ +gootW5w@EN/
4 (hdmm463gtWdDMMBD5w~~FG -dll;/t}}%*FMM:*FMM:0(;'(.0
& TNHT7??;VDJ
 TN8D'//:FCJ;	
c7Frrt   r4   c                      e Zd ZdZdZdZdgZddgZdgZdZ	d	d
e
fd eej                  e
ej                  ej                   ee      ej                        fd eej                  ej                  ej                   ee      ej                        fd eej                  ej                   ee      ej                        fd eej                  ej                   ee      ej                        fdej                  fd eej                   ee      ej                        fdefd eej                   ee      e      fd eee      fg
iZy)r>   zh
    Generic myghty templates lexer. Code that isn't Myghty
    markup is yielded as `Token.Other`.
    Myghtyhttp://www.myghty.org/myghtyz*.mytautodelegatezapplication/x-myghty0.6r   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   r   r   r   r   Tagr   r   r   r	   r   r"   r   r   rm   rt   rs   r>   r>     sf   
 D
"CjG.)I'(IM 	TNCdhhdmmTXXDk488-. 4dhhtxxK($((45 )dhhu[/A488LN*dhhu[/A488LNdhh#dhhk 2DHH=?$g.(dhhk 2E:<	  x0	2%
Frt   r>   c                   :     e Zd ZdZdZdgZdgZdZdZ fdZ	 xZ
S )r?   z^
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `HtmlLexer`.
    zHTML+Myghtyzhtml+myghtyztext/html+myghtyr   r   c                 8    t        |   t        t        fi | y r   )r   rp   r   r>   r   s     rs   rp   zMyghtyHtmlLexer.__init__      K;7;rt   r   r   r   r   r   r   r   r   r   rp   r   r   s   @rs   r?   r?     s2    
 DoG#$I
"CM< <rt   r?   c                   :     e Zd ZdZdZdgZdgZdZdZ fdZ	 xZ
S )r@   z]
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `XmlLexer`.
    z
XML+Myghtyz
xml+myghtyzapplication/xml+myghtyr   r   c                 8    t        |   t        t        fi | y r   )r   rp   r   r>   r   s     rs   rp   zMyghtyXmlLexer.__init__      ;:':rt   r  r   s   @rs   r@   r@     s2    
 DnG)*I
"CM; ;rt   r@   c                   >     e Zd ZdZdZddgZg dZdZdZ fdZ	 xZ
S )	rB   zd
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `JavascriptLexer`.
    zJavaScript+Myghtyzjavascript+myghtyz	js+myghty)zapplication/x-javascript+myghtyztext/x-javascript+myghtyztext/javascript+mygthyr   r   c                 8    t        |   t        t        fi | y r   )r   rp   r   r>   r   s     rs   rp   zMyghtyJavascriptLexer.__init__      +AArt   r  r   s   @rs   rB   rB     s8    
 D"K0G+I #CMB Brt   rB   c                   :     e Zd ZdZdZdgZdgZdZdZ fdZ	 xZ
S )rA   z]
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `CssLexer`.
    z
CSS+Myghtyz
css+myghtyztext/css+myghtyr   r   c                 8    t        |   t        t        fi | y r   )r   rp   r   r>   r   s     rs   rp   zMyghtyCssLexer.__init__  r
  rt   r  r   s   @rs   rA   rA      s2    
 DnG"#I
"CM; ;rt   rA   c                      e Zd ZdZdZdZdgZg dZdgZdZ	dd	e
fd
 eej                  ej                  ej                        fd eej                  e
ej                   ej                   ee      ej                        fd eej                  ddd ee      ej                        fd eej                  ej                    ee      ej                        fd eej                  ej                    ee      ej                        fdej                  fd eej                   ee      ej                        fdefd eej                   ee      e      fd e ee      e      fgiZd Zy)rC   zl
    Generic mason templates lexer. Stolen from Myghty lexer. Code that isn't
    Mason markup is HTML.
    Masonzhttp://www.masonhq.com/mason)z*.mz*.mhtmlz*.mcz*.miautohandlerdhandlerzapplication/x-mason1.4r   r   z(?s)(<%doc>)(.*?)(</%doc>)r   z%(?s)(<%(\w+)(.*?)(>))(.*?)(</%\2\s*>)Nz(?s)(<&[^|])(.*?)(,.*?)?(&>)r   r   r   r   r  r  c                     d}t        j                  d|       d}|S t        j                  d| t         j                        d}|S )Nr   z</%(class|doc|init)>g      ?z<&.+&>g)\(?r   )r   results     rs   r   zMasonLexer.analyse_text=  sH    99,d3?F  YYy$		2>Frt   )r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   	Multiliner   r   r   r
   r"   r   r   r   r   rm   rt   rs   rC   rC     s    D
#CiGMI&'IM 	Z *dhh 1 1488<>Cdhh
DMM488Dk488-. 6dhhdD%	2BDHHMO,dhhuY/?JL*dhhuY/?JLdhh#dhhi 0$((;=$g.(dhhi 0%8:	  i 0(;	='
FBrt   rC   c                   4   e Zd ZdZdZdZdgZdgZdgZdZ	d e
ej                  ej                  ee      fd	 e
ej                  ej                   ee      e      fd
 e
ej                  ej&                  ej                        fdej(                  fd e
ej                  ej,                        dfd e
ej                  ej,                  ej                        fdej                  dfd e
ej                   ee      ej                        fd e
ej                   ee      ej                        fd e
ee      fdefgdej                  fdej,                  f ed      gd e
ej2                  ee      fdej                  dfdefgdedfdedfdedfgdZy)rD   zd
    Generic mako templates lexer. Code that isn't Mako
    markup is yielded as `Token.Other`.
    Makohttp://www.makotemplates.org/makoz*.maozapplication/x-mako0.7z(\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   ry   z'(?<=<%)(include|inherit|namespace|page)z((?:\w+)\s*=)(\s*)(".*?")/?\s*>r   ".*?"'.*?'[^\s>]+)r   r  r   attrN)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r"   r   r	   r   r  r   r   r   r   r   r    r   rm   rt   rs   rD   rD   F  s   
 D
)ChG	I%&IM /doowGI'doowk8JERT&doow~~tGI$g&7&78goot||4e=!goot||W__EG+>'goou['97??KMgoou['97??KM %*, TN? 
D GOO$7FEN
 *dnndF350TN	
 ff%ff%(
[2Frt   rD   c                   :     e Zd ZdZdZdgZdgZdZdZ fdZ	 xZ
S )rE   z\
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `HtmlLexer`.
    z	HTML+Makoz	html+makoztext/html+makor  r  c                 8    t        |   t        t        fi | y r   )r   rp   r   rD   r   s     rs   rp   zMakoHtmlLexer.__init__      I99rt   r  r   s   @rs   rE   rE     s2    
 DmG!"I
)CM: :rt   rE   c                   :     e Zd ZdZdZdgZdgZdZdZ fdZ	 xZ
S )rF   z[
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `XmlLexer`.
    zXML+Makozxml+makozapplication/xml+makor  r  c                 8    t        |   t        t        fi | y r   )r   rp   r   rD   r   s     rs   rp   zMakoXmlLexer.__init__      988rt   r  r   s   @rs   rF   rF     s2    
 DlG'(I
)CM9 9rt   rF   c                   >     e Zd ZdZdZddgZg dZdZdZ fdZ	 xZ
S )	rG   zb
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `JavascriptLexer`.
    zJavaScript+Makozjavascript+makozjs+mako)zapplication/x-javascript+makoztext/x-javascript+makoztext/javascript+makor  r  c                 8    t        |   t        t        fi | y r   )r   rp   r   rD   r   s     rs   rp   zMakoJavascriptLexer.__init__  s    )?w?rt   r  r   s   @rs   rG   rG     s8    
 D ),G)I *CM@ @rt   rG   c                   :     e Zd ZdZdZdgZdgZdZdZ fdZ	 xZ
S )rH   z[
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `CssLexer`.
    zCSS+Makozcss+makoztext/css+makor  r  c                 8    t        |   t        t        fi | y r   )r   rp   r   rD   r   s     rs   rp   zMakoCssLexer.__init__  r)  rt   r  r   s   @rs   rH   rH     s2    
 DlG !I
)CM9 9rt   rH   c                       e Zd ZdZd Zy)CheetahPythonLexerzI
    Lexer for handling Cheetah's special $ tokens in Python syntax.
    c              #      K   t        di | j                  }|j                  |      D ]5  \  }}}|t        j                  k(  r|dk(  rt
        j                  }|||f 7 y w)N$rm   )r	   rr   r   r#   r   r   r   )rq   r   pylexerpostype_values         rs   r   z)CheetahPythonLexer.get_tokens_unprocessed  s`     --!(!?!?!E 	$C#ue##	$s   A A"N)r   r   r   r   r   rm   rt   rs   r/  r/    s    $rt   r/  c                   \   e Zd ZdZdZdZddgZddgZdd	gZd
Z	dd e
e      fdefdej                  fdej                  fd e
ej                   ee      ej                        fd e
ej                   ee            fd e
ej                   ee      ej                        fdefdefg	iZy)rJ   z
    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/
    Cheetahhttp://www.cheetahtemplate.org/cheetahspitfirez*.tmplz*.sptzapplication/x-cheetahzapplication/x-spitfirerj   r   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   r   r   r   r   r   r/  r"   r   r   rm   rt   rs   rJ   rJ     s     D
+C*%G7#I(*BCIM 	w" '*"GOO4)*w.@(A(* (goou-?'@AC%goou-?'@oo'(  TN/
Frt   rJ   c                   >     e Zd ZdZdZg dZddgZdZdZ fdZ	 xZ
S )	rK   z_
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `HtmlLexer`.
    zHTML+Cheetah)zhtml+cheetahzhtml+spitfirehtmlcheetahztext/html+cheetahztext/html+spitfirer8  rj   c                 8    t        |   t        t        fi | y r   )r   rp   r   rJ   r   s     rs   rp   zCheetahHtmlLexer.__init__  s    L<G<rt   r  r   s   @rs   rK   rK     s3    
 D>G$&:;I
+CM= =rt   rK   c                   >     e Zd ZdZdZddgZddgZdZdZ fd	Z	 xZ
S )
rL   z^
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `XmlLexer`.
    zXML+Cheetahzxml+cheetahzxml+spitfirezapplication/xml+cheetahzapplication/xml+spitfirer8  rj   c                 8    t        |   t        t        fi | y r   )r   rp   r   rJ   r   s     rs   rp   zCheetahXmlLexer.__init__"      <;7;rt   r  r   s   @rs   rL   rL     s8    
 Dn-G*,FGI
+CM< <rt   rL   c                   >     e Zd ZdZdZg dZg dZdZdZ fdZ	 xZ
S )rM   ze
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `JavascriptLexer`.
    zJavaScript+Cheetah)zjavascript+cheetahz
js+cheetahzjavascript+spitfirezjs+spitfire)z application/x-javascript+cheetahztext/x-javascript+cheetahztext/javascript+cheetahz!application/x-javascript+spitfireztext/x-javascript+spitfireztext/javascript+spitfirer8  rj   c                 8    t        |   t        t        fi | y r   )r   rp   r   rJ   r   s     rs   rp   zCheetahJavascriptLexer.__init__8  s    ,B'Brt   r  r   s   @rs   rM   rM   &  s5    
  D5G-I ,CMC Crt   rM   c                   R   e Zd ZdZdZdZdgZddgZdZde	fd	 e
ee      fd
 e
eej                        df ed      de	fgdedfd ee      dfd e
ee ee            dfdedfd e
eee      dfgd e
ej                   ee      ej                        fdej&                  fgdZy)r;   z8
    A lexer that highlights genshi text templates.
    zGenshi Texthttps://genshi.edgewall.org/
genshitextzapplication/x-genshi-textztext/x-genshirj   z[^#$\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   rF  r   N)r   r   r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r	   r   r   r   r   rm   rt   rs   r;   r;   <  s    D
(CnG,o>IM % xg678D'//:KHJ
 D&!#U;%7@0gtU;%78&B$gv6&$(H&Q
 'goou['97??KM,]]
!Frt   r;   c                      e Zd ZdZej
                  Zdefd ee	j                   ee      e	j                        fdefdej                  dfdej                  df ed	      d
efgdefdej"                  dfdej                  dfgd ee ee      e      dfd ee ee      e      dfdedfgdefdej"                  dfdej"                  dfdej                  dfgdedfdedfdedfgdedf ed      defgdedf ed      defgdef ed	      gd ee	j                   ee      e	j                        fdej&                  fgd	Zy) 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[^"'$]+rG  z(?<!\$)(\$)([a-zA-Z_][\w\.]*))	r   rJ  rK  r   r#  rM  rO  rP  r   N)r   r   r   r   r   r   r   r"   r   r   r   r   r	   r   r  r   r   r   r    r   r   rm   rt   rs   rI  rI  `  s   
 IIE %goou['97??KM 8?#TXXw7"DHHe4Je

 TNT^^X6&)
 HVU;-?H&QHVU;-?H&Q(
 TNt~~x8T^^V4&)	
 &.)&.)(
 &&!I&M
 &&!I&M
  J

 'goou['97??KM-]]
_5Frt   rI  c                   J     e Zd ZdZdZddgZdZg dZdgZdZ	 fd	Z
d
 Z xZS )r:   z
    A lexer that highlights `genshi <https://genshi.edgewall.org/>`_ and
    `kid <http://kid-templating.org/>`_ kid HTML templates.
    zHTML+Genshizhtml+genshizhtml+kidrj   r   *.htm*.xhtmlztext/html+genshirD  c                 8    t        |   t        t        fi | y r   )r   rp   r   rI  r   s     rs   rp   zHtmlGenshiLexer.__init__  s    $5AArt   c                     d}t        j                  d|       |dz  }t        j                  d|       |dz  }|t        j                  |       z   dz
  S Nr   z	\$\{.*?\}皙?zpy:(.*?)=["\']r   )r   r   r   r   r   s     rs   r   zHtmlGenshiLexer.analyse_text  sW    99\4(4#IB99&-9#IBI**400477rt   r   r   s   @rs   r:   r:     s;    
 Dj)GM4O#$I
(CB8rt   r:   c                   P     e Zd ZdZdZg dZdgZdZdgZddgZ	d	Z
 fd
Zd Z xZS )r9   z
    A lexer that highlights `genshi <https://genshi.edgewall.org/>`_ and
    `kid <http://kid-templating.org/>`_ kid XML templates.
    Genshi)genshikidz
xml+genshizxml+kidz*.kidrj   r   zapplication/x-genshizapplication/x-kidrD  c                 8    t        |   t        t        fi | y r   )r   rp   r   rI  r   s     rs   rp   zGenshiLexer.__init__  s    #4@@rt   c                     d}t        j                  d|       |dz  }t        j                  d|       |dz  }|t        j                  |       z   dz
  S rW  )r   r   r   r   r   s     rs   r   zGenshiLexer.analyse_text  sW    99\4(4#IB99&-9#IBH))$//$66rt   r   r   r   r   r   r   r   r   r   r   r   rp   r   r   r   s   @rs   r9   r9     sB    
 D8G	IMiO')<=I
(CA7rt   r9   c                   J     e Zd ZdZdZg dZdZdgZg dZdZ	 fdZ
d	 Z xZS )
r=   zK
    A lexer that highlights javascript code in genshi text templates.
    zJavaScript+Genshi Text)zjs+genshitextz	js+genshizjavascript+genshitextzjavascript+genshirj   *.js)zapplication/x-javascript+genshiztext/x-javascript+genshiztext/javascript+genshihttps://genshi.edgewall.orgc                 8    t        |   t        t        fi | y r   )r   rp   r   r;   r   s     rs   rp   zJavascriptGenshiLexer.__init__  s    /EWErt   c                 2    t         j                  |       dz
  S N皙?r9   r   r   s    rs   r   z"JavascriptGenshiLexer.analyse_text      ''-44rt   r   r   s   @rs   r=   r=     s;     $D$GMhO+I (CF5rt   r=   c                   H     e Zd ZdZdZddgZdZdgZdgZdZ	 fd	Z
d
 Z xZS )r<   zK
    A lexer that highlights CSS definitions in genshi text templates.
    zCSS+Genshi Textzcss+genshitextz
css+genshirj   *.cssztext/css+genshirb  c                 8    t        |   t        t        fi | y r   )r   rp   r   r;   r   s     rs   rp   zCssGenshiLexer.__init__  s    ?>g>rt   c                 2    t         j                  |       dz
  S re  rg  r   s    rs   r   zCssGenshiLexer.analyse_text  rh  rt   r   r   s   @rs   r<   r<     s<     D.GMiO"#I
'C?5rt   r<   c                   P     e Zd ZdZdZg dZdgZdZg dZdgZ	dZ
 fd	Zd
 Z xZS )r+   z
    Subclass of the ERB lexer that highlights the unlexed data with the
    html lexer.

    Nested Javascript and CSS is highlighted too.
    RHTML)rhtmlzhtml+erbz	html+rubyz*.rhtmlrj   rR  ztext/html+rubyrh   c                 8    t        |   t        t        fi | y r   )r   rp   r   r*   r   s     rs   rp   zRhtmlLexer.__init__      H88rt   c                 V    t         j                  |       dz
  }t        |       r|dz  }|S Nr   g      ?)r*   r   r$   r   s     rs   r   zRhtmlLexer.analyse_text  s-    ""4(4/%#IB	rt   r_  r   s   @rs   r+   r+     s<     D0GIM4O!"I
'C9rt   r+   c                   H     e Zd ZdZdZddgZdZdgZdgZdZ	 fd	Z
d
 Z xZS )r,   zo
    Subclass of `ErbLexer` which highlights data outside preprocessor
    directives with the `XmlLexer`.
    zXML+Rubyzxml+rubyzxml+erbrj   r   zapplication/xml+rubyrh   c                 8    t        |   t        t        fi | y r   )r   rp   r   r*   r   s     rs   rp   zXmlErbLexer.__init__%      87w7rt   c                 V    t         j                  |       dz
  }t        |       r|dz  }|S r   )r*   r   r%   r   s     rs   r   zXmlErbLexer.analyse_text(  -    ""4(4/$#IB	rt   r   r   s   @rs   r,   r,     s<    
 D9%GMiO'(I
'C8rt   r,   c                   H     e Zd ZdZdZddgZdZdgZdgZdZ	 fd	Z
d
 Z xZS )r-   zS
    Subclass of `ErbLexer` which highlights unlexed data with the `CssLexer`.
    zCSS+Rubyzcss+rubyzcss+erbrj   rj  ztext/css+rubyrh   c                 8    t        |   t        t        fi | y r   )r   rp   r   r*   r   s     rs   rp   zCssErbLexer.__init__;  rv  rt   c                 2    t         j                  |       dz
  S re  r*   r   r   s    rs   r   zCssErbLexer.analyse_text>      $$T*T11rt   r   r   s   @rs   r-   r-   /  s<     D9%GMiO !I
'C82rt   r-   c                   J     e Zd ZdZdZg dZdZdgZg dZdZ	 fdZ
d	 Z xZS )
r.   z^
    Subclass of `ErbLexer` which highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Ruby)zjavascript+rubyzjs+rubyzjavascript+erbzjs+erbrj   ra  )zapplication/x-javascript+rubyztext/x-javascript+rubyztext/javascript+rubyrh   c                 8    t        |   t        t        fi | y r   )r   rp   r   r*   r   s     rs   rp   zJavascriptErbLexer.__init__Q      (>g>rt   c                 2    t         j                  |       dz
  S re  r|  r   s    rs   r   zJavascriptErbLexer.analyse_textT  r}  rt   r   r   s   @rs   r.   r.   B  s8    
 DHGMhO)I (C?2rt   r.   c                   P     e Zd ZdZdZdgZdgZdZg dZg dZ	dZ
 fd	Zd
 Z xZS )r&   z
    Subclass of `PhpLexer` that highlights unhandled data with the `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+PHPzhtml+phpz*.phtmlrj   )*.phpr   rS  rT  
*.php[345])zapplication/x-phpzapplication/x-httpd-phpzapplication/x-httpd-php3zapplication/x-httpd-php4zapplication/x-httpd-php5https://www.php.netc                 8    t        |   t        t        fi | y r   )r   rp   r   r   r   s     rs   rp   zHtmlPhpLexer.__init__k  rq  rt   c                 V    t        j                  |       dz
  }t        |       r|dz  }|S rs  )r   r   r$   r   s     rs   r   zHtmlPhpLexer.analyse_textn  s-    ""4(4/%#IB	rt   r_  r   s   @rs   r&   r&   X  sB     DlGIM%OII  C9rt   r&   c                   H     e Zd ZdZdZdgZdZg dZdgZdZ	 fdZ
d	 Z xZS )
r'   zT
    Subclass of `PhpLexer` that highlights unhandled data with the `XmlLexer`.
    zXML+PHPzxml+phprj   )r   r  r  zapplication/xml+phpr  c                 8    t        |   t        t        fi | y r   )r   rp   r   r   r   s     rs   rp   zXmlPhpLexer.__init__  rv  rt   c                 V    t        j                  |       dz
  }t        |       r|dz  }|S r   )r   r   r%   r   s     rs   r   zXmlPhpLexer.analyse_text  rx  rt   r   r   s   @rs   r'   r'   u  s7     DkGM6O&'I
C8rt   r'   c                   F     e Zd ZdZdZdgZdZdgZdgZdZ	 fdZ
d	 Z xZS )
r(   zU
    Subclass of `PhpLexer` which highlights unmatched data with the `CssLexer`.
    zCSS+PHPzcss+phprj   rj  ztext/css+phpr  c                 8    t        |   t        t        fi | y r   )r   rp   r   r   r   s     rs   rp   zCssPhpLexer.__init__  rv  rt   c                 2    t        j                  |       dz
  S re  r   r   r   s    rs   r   zCssPhpLexer.analyse_text  r}  rt   r   r   s   @rs   r(   r(     s9     DkGMiO I
C82rt   r(   c                   J     e Zd ZdZdZddgZdZdgZg dZdZ	 fd	Z
d
 Z xZS )r)   z`
    Subclass of `PhpLexer` which highlights unmatched data with the
    `JavascriptLexer`.
    zJavaScript+PHPzjavascript+phpzjs+phprj   ra  )zapplication/x-javascript+phpztext/x-javascript+phpztext/javascript+phpr  c                 8    t        |   t        t        fi | y r   )r   rp   r   r   r   s     rs   rp   zJavascriptPhpLexer.__init__  r  rt   c                 ,    t        j                  |       S r   r  r   s    rs   r   zJavascriptPhpLexer.analyse_text  s    $$T**rt   r   r   s   @rs   r)   r)     s=    
 D*GMhO(I  C?+rt   r)   c                   H     e Zd ZdZdZdgZdZg dZdgZdZ	 fdZ
d	 Z xZS )
r0   z
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+Smartyzhtml+smartyrj   )r   rS  rT  r   ztext/html+smartyr   c                 8    t        |   t        t        fi | y r   )r   rp   r   r/   r   s     rs   rp   zHtmlSmartyLexer.__init__  r  rt   c                 V    t         j                  |       dz
  }t        |       r|dz  }|S rs  )r/   r   r$   r   s     rs   r   zHtmlSmartyLexer.analyse_text  -    %%d+d2%#IB	rt   r   r   s   @rs   r0   r0     s7     DoGM=O#$I
#C<rt   r0   c                   H     e Zd ZdZdZdgZdZddgZdgZdZ	 fd	Z
d
 Z xZS )r1   z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `XmlLexer`.
    z
XML+Smartyz
xml+smartyrj   r   r   zapplication/xml+smartyr   c                 8    t        |   t        t        fi | y r   )r   rp   r   r/   r   s     rs   rp   zXmlSmartyLexer.__init__  r
  rt   c                 V    t         j                  |       dz
  }t        |       r|dz  }|S r   )r/   r   r%   r   s     rs   r   zXmlSmartyLexer.analyse_text  -    %%d+d2$#IB	rt   r   r   s   @rs   r1   r1     s<    
 DnGM(O)*I
#C;rt   r1   c                   H     e Zd ZdZdZdgZdZddgZdgZdZ	 fd	Z
d
 Z xZS )r2   z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `CssLexer`.
    z
CSS+Smartyz
css+smartyrj   rj  r   ztext/css+smartyr   c                 8    t        |   t        t        fi | y r   )r   rp   r   r/   r   s     rs   rp   zCssSmartyLexer.__init__  r
  rt   c                 2    t         j                  |       dz
  S re  r/   r   r   s    rs   r   zCssSmartyLexer.analyse_text  rh  rt   r   r   s   @rs   r2   r2     s<    
 DnGM(O"#I
#C;5rt   r2   c                   L     e Zd ZdZdZddgZdZddgZg dZd	Z	 fd
Z
d Z xZS )r3   zd
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Smartyzjavascript+smartyz	js+smartyrj   ra  r   )zapplication/x-javascript+smartyztext/x-javascript+smartyztext/javascript+smartyr   c                 8    t        |   t        t        fi | y r   )r   rp   r   r/   r   s     rs   rp   zJavascriptSmartyLexer.__init__  r  rt   c                 2    t         j                  |       dz
  S re  r  r   s    rs   r   z"JavascriptSmartyLexer.analyse_text
  rh  rt   r   r   s   @rs   r3   r3     sA    
 D"K0GMw'O+I $CB5rt   r3   c                   T     e Zd ZdZdZg dZg dZdZg dZddgZ	d	Z
 fd
Zd Z xZS )r5   z
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+Django/Jinja)zhtml+djangoz
html+jinja
htmldjango)z	*.html.j2z*.htm.j2z
*.xhtml.j2z*.html.jinja2z*.htm.jinja2z*.xhtml.jinja2rj   rR  ztext/html+djangoztext/html+jinjar   c                 8    t        |   t        t        fi | y r   )r   rp   r   r4   r   s     rs   rp   zHtmlDjangoLexer.__init__  r  rt   c                 V    t         j                  |       dz
  }t        |       r|dz  }|S rs  )r4   r   r$   r   s     rs   r   zHtmlDjangoLexer.analyse_text!  r  rt   r_  r   s   @rs   r5   r5     s=     D9GjIM4O#%67I
AC<rt   r5   c                   R     e Zd ZdZdZddgZddgZdZdgZd	d
gZ	dZ
 fdZd Z xZS )r7   z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `XmlLexer`.
    zXML+Django/Jinjaz
xml+djangoz	xml+jinjaz*.xml.j2z*.xml.jinja2rj   r   zapplication/xml+djangozapplication/xml+jinjar   c                 8    t        |   t        t        fi | y r   )r   rp   r   r4   r   s     rs   rp   zXmlDjangoLexer.__init__6  r
  rt   c                 V    t         j                  |       dz
  }t        |       r|dz  }|S r   )r4   r   r%   r   s     rs   r   zXmlDjangoLexer.analyse_text9  r  rt   r_  r   s   @rs   r7   r7   (  sI    
 D[)G^,IMiO)+BCI
AC;rt   r7   c                   R     e Zd ZdZdZddgZddgZdZdgZd	d
gZ	dZ
 fdZd Z xZS )r6   z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `CssLexer`.
    zCSS+Django/Jinjaz
css+djangoz	css+jinjaz*.css.j2z*.css.jinja2rj   rj  ztext/css+djangoztext/css+jinjar   c                 8    t        |   t        t        fi | y r   )r   rp   r   r4   r   s     rs   rp   zCssDjangoLexer.__init__N  r
  rt   c                 2    t         j                  |       dz
  S re  r4   r   r   s    rs   r   zCssDjangoLexer.analyse_textQ  rh  rt   r_  r   s   @rs   r6   r6   @  sI    
 D[)G^,IMiO"$45I
AC;5rt   r6   c                   R     e Zd ZdZdZg dZddgZdZdgZg dZ	d	Z
 fd
Zd Z xZS )r8   zd
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Django/Jinja)zjavascript+djangoz	js+djangozjavascript+jinjazjs+jinjaz*.js.j2z*.js.jinja2rj   ra  )zapplication/x-javascript+djangozapplication/x-javascript+jinjaztext/x-javascript+djangoztext/x-javascript+jinjaztext/javascript+djangoztext/javascript+jinjar   c                 8    t        |   t        t        fi | y r   )r   rp   r   r4   r   s     rs   rp   zJavascriptDjangoLexer.__init__i  r  rt   c                 2    t         j                  |       dz
  S re  r  r   s    rs   r   z"JavascriptDjangoLexer.analyse_textl  rh  rt   r_  r   s   @rs   r8   r8   U  sF    
 %D/GM*IMhO*I BCB5rt   r8   c                   N    e Zd ZdZdedfdefdefdefgdedfd	 ee      fgd
Zy)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).*?>[^<]+<rz   r   [\w\W]+?(?=%>|\Z)r   r  N)	r   r   r   r   r   r"   r   r   r   rm   rt   rs   r  r  p  sW     w&Su5M
 GV$!5#34
Frt   r  c                   F     e Zd ZdZdZdgZdgZdgZdZdZ	 fdZ
d	 Z xZS )
rI   z&
    Lexer for Java Server Pages.
    zJava Server Pagejspz*.jspzapplication/x-jspz.https://projects.eclipse.org/projects/ee4j.jspr  c                 8    t        |   t        t        fi | y r   r   rp   r   r  r   s     rs   rp   zJspLexer.__init__  r@  rt   c                 p    t        j                  |       dz
  }t        |       r|dz  }d| v r	d| v r|dz  }|S Nr   r   ry   rz   r   )r   r   r%   r   s     rs   r   zJspLexer.analyse_text  sC    ##D)D0$#IB4<DDL#IB	rt   r   r   r   r   r   r   r   r   r   r   rp   r   r   r   s   @rs   rI   rI     s9     DgG	I$%I
:CM<rt   rI   c                      e Zd ZdZdZdgZdgZdgZdZdZ	e
j                  Zdefd	ej                  d
fdefdej                  fd eeej&                  edee      fd eeej&                  ede ee      e      fd eeej&                  ed ee      e      fd eeej&                        fd eed ee      ej&                  dde      fdefg
dej                  fd	ej                  dfdej                  dfdej                  fgdZd Zy)rN   z7
    For files using the Evoque templating system.
    Evoqueevoquez*.evoquezapplication/x-evoquehttps://gizmojo.org/templating1.1z[^#$]+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| v ryy)z.Evoque templates use $evoque, which is unique.z$evoquerv   Nrm   r   s    rs   r   zEvoqueLexer.analyse_text  s     rt   )r   r   r   r   r   r   r   r   r   r   r   r   r   r"   r   r  r   r   r   r   r    r   r	   r   r   rm   rt   rs   rN   rN     sv    DjGI'(I
*CMIIE W&&	2e!2!237k4<<dk+,!k4<<deK0+?@
 2k4<<dK(+78 "8K#FG5k4{);llD$=> 5M9
> ))*W&&0W&&/w(()	
?%FNrt   rN   c                   F     e Zd ZdZdZdgZdgZdgZdZdZ	 fdZ
d	 Z xZS )
rO   z^
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `HtmlLexer`.
    zHTML+Evoquezhtml+evoquer   ztext/html+evoquer  r  c                 8    t        |   t        t        fi | y r   )r   rp   r   rN   r   s     rs   rp   zEvoqueHtmlLexer.__init__  r  rt   c                 ,    t         j                  |       S r   rN   r   r   s    rs   r   zEvoqueHtmlLexer.analyse_text      ''--rt   r   r   r   r   r   r   r   r   r   r   rp   r   r   r   s   @rs   rO   rO     s9     DoGjO#$I
*CM<.rt   rO   c                   F     e Zd ZdZdZdgZdgZdgZdZdZ	 fdZ
d	 Z xZS )
rP   z]
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `XmlLexer`.
    z
XML+Evoquez
xml+evoquer   zapplication/xml+evoquer  r  c                 8    t        |   t        t        fi | y r   )r   rp   r   rN   r   s     rs   rp   zEvoqueXmlLexer.__init__  r
  rt   c                 ,    t         j                  |       S r   r  r   s    rs   r   zEvoqueXmlLexer.analyse_text  r  rt   r  r   s   @rs   rP   rP     s9     DnGiO)*I
*CM;.rt   rP   c                      e Zd ZdZdZdgZg Zg ZdZdZ	e
j                  Zdej                  fdej                  fdefd	efd
efdefdefdefdefdej$                  dfdej                  fdefdefdej*                  fdej*                  fd eej0                  ee      fdej6                  fdefdefgdej$                  fdej8                  fdej$                  fdej$                  fdej$                  dfgdZy )!rQ   z
    Coldfusion statements
    cfstatementcfs5https://www.adobe.com/products/coldfusion-family.htmlrj   z//.*?\nz/\*(?:.|\n)*?\*/z\+\+|--z
[-+*/^&=!]z<=|>=|<|>|==zmod\bz"(eq|lt|gt|lte|gte|not|is|and|or)\bz\|\||&&z\?rL  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   r   r   
IGNORECASEr   r   r   r  r   r    r   r!   r   r   r   r   r   r   r   r   Interpr   rm   rt   rs   rQ   rQ     s\    DgGII
ACMMME ( '"3"34"H%h'x 2H="H6==(+ v}}%VMNUW $W%5%56T]](dmmT;79t}}- +.TN3
8 FMM"v}}%&6==!6==&)
9#Frt   rQ   c                      e Zd ZdZdZdgZg Zg ZdZde	f e
d      de	fgdej                  d	fd
efdej                  dfd eej                   ee      ej                        fd eej                   ee      ej                        fgde	fd ee ee      e      fdej                  df e
d      de	fde	fgdej                  dfdej                  dfdej                  fgdZy)ColdfusionMarkupLexerz 
    Coldfusion markup only
    
Coldfusioncfr  r  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   r"   r   r   r  r   r   r   r   rQ   r   r   rm   rt   rs   r  r  2  sD    DfGII
AC uFO
 w((+6(t||Z88dllE/$:DLLIKQ dllE/$:DLLI	K
 Xk53I&13 4 f5FOU#5M	
 w(('2g''0+W->->?
;"Frt   r  c                   B     e Zd ZdZdZdgZddgZdgZdZdZ	 fd	Z
 xZS )
rR   z#
    Coldfusion markup in html
    zColdfusion HTMLcfmz*.cfmz*.cfmlzapplication/x-coldfusionr  rj   c                 8    t        |   t        t        fi | y r   )r   rp   r   r  r   s     rs   rp   zColdfusionHtmlLexer.__init__l  s    $9EWErt   r   r   r   r   r   r   r   r   r   r   rp   r   r   s   @rs   rR   rR   a  s>     DgG(#I+,I
ACMF Frt   rR   c                   >     e Zd ZdZdZdgZdgZg ZdZdZ	 fdZ
 xZS )rS   z-
    Coldfusion markup/script components
    zColdfusion CFCcfcz*.cfcr  2.0c                 8    t        |   t        t        fi | y r   )r   rp   rR   rQ   r   s     rs   rp   zColdfusionCFCLexer.__init__{  s    ,oIIrt   r  r   s   @rs   rS   rS   p  s8     DgG	II
ACMJ Jrt   rS   c                   F     e Zd ZdZdZdgZdgZdgZdZdZ	 fdZ
d	 Z xZS )
rW   z)
    Lexer for Scalate Server Pages.
    zScalate Server Pagesspz*.sspzapplication/x-sspz"https://scalate.github.io/scalate/r  c                 8    t        |   t        t        fi | y r   r  r   s     rs   rp   zSspLexer.__init__  r@  rt   c                 z    d}t        j                  d|       r|dz  }t        |       r|dz  }d| v r	d| v r|dz  }|S )Nr   zval \w+\s*:g333333?rX  ry   rz   r   )r   r   r%   r   s     rs   r   zSspLexer.analyse_text  sJ    99^T*#IB$#IB4<DDL#IB	rt   r  r   s   @rs   rW   rW     s9     !DgG	I$%I
.CM<rt   rW   c                   H    e Zd ZdZdedfdefdefgdedfd ee      fgd	Zy
)TeaTemplateRootLexerz
    Base for the `TeaTemplateLexer`. Yields `Token.Other` for area outside of
    code blocks.

    .. versionadded:: 1.5
    r  r  r  r  rz   r   r  r  N)	r   r   r   r   r   r"   r   r   r   rm   rt   rs   r  r    sL     w&u5M
 GV$!5#67
Frt   r  c                   F     e Zd ZdZdZdgZdgZdgZdZdZ	 fdZ
d	 Z xZS )
rX   z"
    Lexer for Tea Templates.
    Teateaz*.teaz
text/x-teaz$https://github.com/teatrove/teatrovez1.5c                 8    t        |   t        t        fi | y r   )r   rp   r   r  r   s     rs   rp   zTeaTemplateLexer.__init__  s    #7C7Crt   c                 p    t        j                  |       dz
  }t        |       r|dz  }d| v r	d| v r|dz  }|S r  )r   r   r%   r   s     rs   r   zTeaTemplateLexer.analyse_text  sC    &&t,t3$#IB4<DDL#IB	rt   r  r   s   @rs   rX   rX     s9     DgG	II
0CMDrt   rX   c                   J     e Zd ZdZdZdgZdZg dZg dZdZ	 fdZ
d	 Z xZS )
rY   z
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `HtmlLexer`.

    Nested JavaScript and CSS is also highlighted.
    z
HTML+Lassoz
html+lasso1.6)r   rS  rT  *.lasso*.lasso[89]*.incl*.inc*.las)ztext/html+lassozapplication/x-httpd-lassozapplication/x-httpd-lasso[89]https://www.lassosoft.comc                 8    t        |   t        t        fi | y r   )r   rp   r   r   r   s     rs   rp   zLassoHtmlLexer.__init__  s    J:':rt   c                 V    t        j                  |       dz
  }t        |       r|dz  }|S rs  )r   r   r$   r   s     rs   r   zLassoHtmlLexer.analyse_text  s-    $$T*T1%#IB	rt   r   r   s   @rs   rY   rY     s:     DnGM3O2I &C;rt   rY   c                   H     e Zd ZdZdZdgZdZg dZdgZdZ	 fdZ
d	 Z xZS )
rZ   z_
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `XmlLexer`.
    z	XML+Lassoz	xml+lassor  )r   r  r  r  r  r  zapplication/xml+lassor  c                 8    t        |   t        t        fi | y r   )r   rp   r   r   r   s     rs   rp   zLassoXmlLexer.__init__  s    :99rt   c                 V    t        j                  |       dz
  }t        |       r|dz  }|S r   )r   r   r%   r   s     rs   r   zLassoXmlLexer.analyse_text  s-    $$T*T1$#IB	rt   r   r   s   @rs   rZ   rZ     s9    
 DmGM3O()I
%C:rt   rZ   c                   F     e Zd ZdZdZdgZdZdgZdgZdZ	 fdZ
d	 Z xZS )
r[   z_
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `CssLexer`.
    z	CSS+Lassoz	css+lassor  rj  ztext/css+lassor  c                 B    d|d<   t        |   t        t        fi | y NTrequiredelimiters)r   rp   r   r   r   s     rs   rp   zLassoCssLexer.__init__  s"    '+#$:99rt   c                 ~    t        j                  |       dz
  }t        j                  d|       r|dz  }d| v r|dz  }|S )Nrf  z
\w+:[^;]+;r   zpadding:)r   r   r   r   r   s     rs   r   zLassoCssLexer.analyse_text
  sD    $$T*T199]D)#IB#IB	rt   r   r   s   @rs   r[   r[     s9    
 DmGMiO!"I
%C:rt   r[   c                   J     e Zd ZdZdZddgZdZdgZg dZdZ	 fd	Z
d
 Z xZS )r\   zf
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `JavascriptLexer`.
    zJavaScript+Lassozjavascript+lassozjs+lassor  ra  )zapplication/x-javascript+lassoztext/x-javascript+lassoztext/javascript+lassor  c                 B    d|d<   t        |   t        t        fi | y r   )r   rp   r   r   r   s     rs   rp   zLassoJavascriptLexer.__init__"  s"    '+#$*@@rt   c                 6    t        j                  |       dz
  }|S re  )r   r   r   s     rs   r   z!LassoJavascriptLexer.analyse_text&  s    $$T*T1	rt   r   r   s   @rs   r\   r\     s>    
 D!:.GMhO*I &CArt   r\   c                      e Zd ZdZdZdZdgZdZdefde	fd e
e	j                  e      d	fd
 e
e	j                  ej                  ej                        d	fd e
e	j                  e      d	fgdefde	j                  dfd e
ee	j                        dfd e
ej                  e      fd e
eee      fd e
eeej&                        fd e
eee      df ed      gdefdedfd e
eeej&                  e      fd e
ee eed            fdej0                  f ed      gdej&                  fdej&                  fdej&                  fg ed      dej4                  fd ej6                  fd!efgd"Zy#)$r]   z
    Generic handlebars template lexer.

    Highlights only the Handlebars template tags (stuff between `{{` and `}}`).
    Everything else is left for a delegating lexer.
    
Handlebarshttps://handlebarsjs.com/
handlebarsr  r   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   r"   r   r   Specialr   r   r!   r   r   r   r   r   r   r   r   r   r   r    r   r   r   rm   rt   rs   r]   r]   +  s    D
%CnGM u W% x>F (goov'7'79I9IJESXgoot<eD
  TN0HVW__=vF ht~~x@A )(7D'*JK"HWdDMM$JKhwkB  I!
& TNK(+Xgt6:mmT.K L"HWd-24z-J%L M&I
 #DMM2$--(-t}}=
 J +FMM:*FMM:'(.0
g<Frt   r]   c                   D     e Zd ZdZdZdgZddgZddgZdZd	Z	 fd
Z
 xZS )r^   zb
    Subclass of the `HandlebarsLexer` that highlights unlexed data with the
    `HtmlLexer`.
    zHTML+Handlebarszhtml+handlebarsz*.handlebarsz*.hbsztext/html+handlebarsztext/x-handlebars-templater  r  c                 8    t        |   t        t        fi | y r   )r   rp   r   r]   r   s     rs   rp   zHandlebarsHtmlLexer.__init__  s    O?w?rt   r  r   s   @rs   r^   r^   w  sB    
 D !G)I')EFI
%CM@ @rt   r^   c                   F     e Zd ZdZdZg dZg dZddgZdZdZ	 fd	Z
 xZS )
r_   z
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `YamlLexer`.

    Commonly used in Saltstack salt states.
    z
YAML+Jinja)z
yaml+jinjasaltsls)z*.slsz	*.yaml.j2z*.yml.j2z*.yaml.jinja2z*.yml.jinja2ztext/x-yaml+jinjaz
text/x-sls!https://jinja.palletsprojects.comr  c                 8    t        |   t        t        fi | y r   )r   rp   r   r4   r   s     rs   rp   zYamlJinjaLexer.__init__  r  rt   r  r   s   @rs   r_   r_     s7     D+GSI$l3I
-CM< <rt   r_   c                      e Zd ZdZdZdZdgZdgZdZi dde	fd e
ee      d	fd
 e
ee eed            dfde	fgd	dej                   dfd e
ej                   e       eddd      fd e
ej                   ee      dfd e
ej&                  e eed      ee      dfd e
ej&                  ee      dfd e
ej&                  ee      dfd e
ej                   dee      dfd e
ej&                  dee      dfd e
ej&                  e eed      ee      d fd! e
ej&                  e      d"fg
d ed      d#edfd$ed%fgd% ed      d#ed&fd' e
ej*                  ee      d(fgd(d$edf ed)       ed*      gd ed       ed      d+ e
 eed      eee eed      ee      fd,efd-ej.                  fd. e
 eed      eej.                  e eed            f ed       ed      gd/ ed       ed0      gd1d2 e
eede      dfd3 e
eej.                  e      dfgd)d#edfgdd4ed&fgd0d5edfgd6 ed      d7 e
ej0                  ee      fd8 e
ee eed      ee      f ed9       ed:       ed;      d<efgd* ed6      d=e	fgd> ed6       ed      d=e	fgd"d4ed&f ed*      gd d4ed&f ed>      gd;d?ej2                  fgd@ej4                  fdAefgdBej8                  fdCej:                  fgdDej>                  fdEej@                  fg ed;       ed9       ed:       ed      gdFefgdG e
eeej&                  ee      d&fd=e!fgde	fdH e
eeej&                  ee      dfde	fgdIZ"y)Jr`   z%
    Lexer for Liquid templates.
    liquidz.https://www.rubydoc.info/github/Shopify/liquidz*.liquidr  r   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*)zvariable-tag-markupz([^\s%]+)(\s*)z
tag-markup\}\}z\|filters)r   r   z([^\s|:]+)(:?)(\s*)zfilter-markupz
end-of-tagzdefault-param-markupz/([^\s=!><]+)(\s*)([=!><]=?)(\s*)(\S+)(\s*)(%\})z\b!z\bnot\bz*([\w.\'"]+)(\s+)(contains)(\s+)([\w.\'"]+)zgeneric-valuezend-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   z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  r  )#r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Reservedr   r   r  r   r   r   Wordr   r   r   r    r   r   r!   FloatIntegerr   r   rm   rt   rs   r`   r`     s    D
:CjGIM@tH[*=~N$k:uT9/MN DM	
@ 	-w/?/?MXg&6&6
CnlI>@ g&&
K@&J 2dhh
E$
,K +/068 $dhh
K8)Edhh
K8%A 0g&&j+FP(dhhj+>H 3dhh
D	2KM"$ : >M=
@Z 	L!k6*K+	
[@h 	L!k#34#dmm[*=P	
i@x 	K(L!*+
y@D 	N#L!?eD)4j( %i"@*!#$ X':eD)4j(-- %i"@BC IL!
E@h 	I'(
i@r 	'j(D*=vG(j(--<fF
s@@ 	k6*
A@H 	["23
I@P 	Z(
Q@Z 	L!$dnnj(;= /k:uT:/N +/0 HHI;
[@z 	N#4L!
{@D 	 N#J4L"
E@P 	["23*+
Q@Z 	["23+, 
[@f 	 '"2"23
g@p dmm,-
 ''
 &,,'V^^$
 IHHJ	
 
#
 1k:txx!#$46 7O	
 t,k:txx!#$*, DM
s@Frt   r`   c                      e Zd ZdZdZdgZdgZdZdZe	j                  e	j                  z  ZdZdZd	ez   d
z   Zeez   Zdefdej&                  dfdefd eej&                  eeeej&                  eej&                  eeeej&                        fd eej&                  eeeej&                  eej&                  eeeej&                        fde d eej&                  eeeej0                        dfd eej&                  ee      dfdefgde d eeeej0                        fde d eeeeeej0                        fdej4                  fdefdej6                  feej8                  fdez   ej8                  fdefdej>                  fdej@                  fdefd efgd!efd" eeej&                        d#f e!d$      gd!efd% eeej&                        d#f e!d$      d&e"fgd'Z#y())ra   z
    Twig template lexer.

    It just highlights Twig code between the preprocessor directives,
    other data is left untouched by the lexer.
    Twigtwigzapplication/x-twighttps://twig.symfony.comr  z[\\\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+)(r   r   r   r   z
(\|)(\s*)(z(is)(\s+)(not)?(\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   r   r   _ident_char_ident_begin
_ident_end_ident_innerr"   r   r   r   r   r   r   r   r   r   r   r   r!   r    r   r   r   r   r   rm   rt   rs   ra   ra   h  sv    DhG%&I
$CMDD244KE *K/L+%,J*,L ugoou-W%1gootWdGOOW__dGToo'(
6gootWdGOOW__dGToo'( ,L>;gootWdDMMJ +gootW5u>EN-
2 <.*hdmm46%l^15gtWdDMMBD,gnn=5 	
 &t||44==)\!4==1&!*FMM:*FMM:DhO'(.0%
, TNHT7??;VDJ
 TN8D'//:FCJ;	
g9Frt   ra   c                   @     e Zd ZdZdZdgZdgZdgZdZdZ	 fdZ
 xZS )	rb   z\
    Subclass of the `TwigLexer` that highlights unlexed data with the
    `HtmlLexer`.
    z	HTML+Twigz	html+twigz*.twigztext/html+twigr)  r  c                 8    t        |   t        t        fi | y r   )r   rp   r   ra   r   s     rs   rp   zTwigHtmlLexer.__init__  r&  rt   r  r   s   @rs   rb   rb     s9    
 DmG
I!"I
$CM: :rt   rb   c                      e Zd ZdZdZdZdgZdZdefd e	e
j                  e      dfd	 e	eej                  eeee      d
fd e	eej                  ee      fd e	eej                  eee      d
fd e	eej                  e      fgdefde
j                  dfdej$                  fdej&                  fdej(                  fdefdej,                  fdej,                  fd e	eeeeeeee      fg	dedfdedfdedfgdZy)rc   z
    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.
    Angular2(https://angular.io/guide/template-syntaxng2z2.1z	[^{([*#]+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   r4  r#  N)r   r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r   r   r    Booleanr   r   r!   r   r   rm   rt   rs   rc   rc     sw    D
4CgGM 5! Xgoot<nM 7k4>>;hPTU /k4>>;EG .k4>>44H&R%k4>>48:!
* T"goov. /*FMM:*FMM:'(.0 (7!4==1 >hfdHdFDQS!
( ff%ff%(
Q-Frt   rc   c                   :     e Zd ZdZdZdgZdgZdZdZ fdZ	 xZ
S )rd   z`
    Subclass of the `Angular2Lexer` that highlights unlexed data with the
    `HtmlLexer`.
    zHTML + Angular2zhtml+ng2z*.ng2r2  r  c                 8    t        |   t        t        fi | y r   )r   rp   r   rc   r   s     rs   rp   zAngular2HtmlLexer.__init__	  r   rt   )r   r   r   r   r   r   r   r   r   rp   r   r   s   @rs   rd   rd   
	  s1    
 DlG	I
4CM> >rt   rd   c                   B     e Zd ZdZdZdgZg dZdZdZ fdZ	d Z
 xZS )	re   z
    Templated SQL lexer.
    z	SQL+Jinjaz	sql+jinja)z*.sqlz*.sql.j2z*.sql.jinja2r  z2.13c                 8    t        |   t        t        fi | y r   )r   rp   r   r4   r   s     rs   rp   zSqlJinjaLexer.__init__%	  r
  rt   c                     d}t        j                  d|       r|dz  }t        j                  d|       r|dz  }t        j                  d|       r|dz  }|S )Nr   z\{\{\s*ref\(.*\)\s*\}\}r   z\{\{\s*source\(.*\)\s*\}\}r   z\{%-?\s*macro \w+\(.*\)\s*-?%\}r   r   r   s     rs   r   zSqlJinjaLexer.analyse_text(	  sT    99/6#IB992D9$JB997>$JB	rt   )r   r   r   r   r   r   r   r   r   rp   r   r   r   s   @rs   re   re   	  s/     DmG5I
-CM;rt   re   )wr   r   pygments.lexers.htmlr   r   pygments.lexers.javascriptr   r   pygments.lexers.cssr   pygments.lexers.phpr   pygments.lexers.pythonr	   pygments.lexers.perlr
   pygments.lexers.jvmr   r   pygments.lexers.datar   pygments.lexers.sqlr   pygments.lexerr   r   r   r   r   r   r   r   r   pygments.tokenr   r   r   r   r   r   r   r   r    r!   r"   r#   pygments.utilr$   r%   __all__r*   r/   rT   rU   rV   r4   r>   r?   r@   rB   rA   rC   rD   rE   rF   rG   rH   r/  rJ   rK   rL   rM   r;   rI  r:   r9   r=   r<   r+   r,   r-   r.   r&   r'   r(   r)   r0   r1   r2   r3   r5   r7   r6   r8   r  rI   rN   rO   rP   rQ   r  rR   rS   rW   r  rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rm   rt   rs   <module>rH     s   
 4 B ( ( . * 7 * (, , ,I I I I >.]u ]@7* 7tQJ Qh> >$ 0R* Rj+* +\<o < ;_ ; BO B$;_ ; 3 3l?
 ?D:O : 9? 9 @/ @$9? 9$
$ 
$*: *Z= = <o < C_ C,!j !H=
 =@8o 827/ 745O 5,5_ 5& 8/ .2/ 2&2 2,? :/ ,2/ 2&+ +,o 2_ .5_ 5(5O 5,o 4_ 05_ 5*5O 56: 2 .7* 7r.o .&._ .&0j 0f,J ,^F/ FJ J 2: , ._ 8O 0O 4? 0Ij IX@/ @"<_ <&J* JZP
 Pf:O :";J ;|> > O rt   