
    5h'                       S r SSKrSSKJrJr  SSKJrJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJr  SS	KJrJr  SS
KJr  SSKJr  SSKJrJrJrJrJrJrJrJrJ r   SSK!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-  SSK.J/r/J0r0  / SQr1 " S S\5      r2 " S S\5      r3 " S S\5      r4 " S S\5      r5 " S S\5      r6 " S S\5      r7 " S S\5      r8 " S S\5      r9 " S  S!\5      r: " S" S#\5      r; " S$ S%\5      r< " S& S'\5      r= " S( S)\5      r> " S* S+\5      r? " S, S-\5      r@ " S. S/\5      rA " S0 S1\5      rB " S2 S3\5      rC " S4 S5\5      rD " S6 S7\5      rE " S8 S9\5      rF " S: S;\5      rG " S< S=\5      rH " S> S?\5      rI " S@ SA\5      rJ " SB SC\5      rK " SD SE\5      rL " SF SG\5      rM " SH SI\5      rN " SJ SK\5      rO " SL SM\5      rP " SN SO\5      rQ " SP SQ\5      rR " SR SS\5      rS " ST SU\5      rT " SV SW\5      rU " SX SY\5      rV " SZ S[\5      rW " S\ S]\5      rX " S^ S_\5      rY " S` Sa\5      rZ " Sb Sc\5      r[ " Sd Se\5      r\ " Sf Sg\5      r] " Sh Si\5      r^ " Sj Sk\5      r_ " Sl Sm\5      r` " Sn So\5      ra " Sp Sq\5      rb " Sr Ss\5      rc " St Su\5      rd " Sv Sw\5      re " Sx Sy\5      rf " Sz S{\5      rg " S| S}\5      rh " S~ S\5      ri " S S\5      rj " S S\5      rk " S S\5      rl " S S\5      rm " S S\5      rn " S S\5      ro " S S\5      rp " S S\5      rq " S S\5      rr " S S\5      rs " S S\5      rt " S S\5      ru " S S\5      rvg)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                   |    \ rS rSrSrSrSrS/rS/rSr	\
R                  " S\
R                  5      rS	 rS
 rS rSrg)r*   3   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                 X    SSK Jn  U" S0 UD6U l        [        R                  " U 40 UD6  g )Nr   )	RubyLexer )pygments.lexers.rubyrm   
ruby_lexerr   __init__)selfoptionsrm   s      d/var/www/html/cementerio_25MayoBackend/env/lib/python3.13/site-packages/pygments/lexers/templates.pyrq   ErbLexer.__init__E   s%    2#.g.t'w'    c              #     #    U R                   R                  U5      nUR                  5         S=p4  US:X  a-  UR                  5       nU[        U4v   U[        U5      -  nSnGOUS:X  Gar  UR                  5       nUS;   a  U[        U4v   US-  nSnGOUS:X  aH  U[        R                  U4v   UR                  5       nUS-   [        U4v   US[        U5      -   -  nSnGOGUS;   as  U[        R                  U4v   U[        U5      -  nUR                  5       nSnU R                  R                  U5       H  u  pn
X-   X4v   M     U[        U5      -  nSnOUS;   a  U[        U4v   U[        U5      -  nSnOU[        R                  US   4v   SnU R                  R                  USS	 5       H  u  pn
US-   U-   X4v   M     U[        U5      -  nSnOMUS:X  aG  UR                  5       nUS;  a  U[        U4v   OU[        R                  U4v   U[        U5      -  nSnGM  ! [         a     g	f = f7f)
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   Preprocrp   get_tokens_unprocessedr   
IndexError)rr   texttokensstateidxvaltagdatar_idxr_tokenr_values              rt   r   ErbLexer.get_tokens_unprocessedJ   sL     %%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 4EG"'+w"?? !Ms4y( !-!5#o-s3x ! "7??CF:: ! $ F Fs12w O 4EG"%'E/7"CC !Ps3x !aZ **,C-/!5#o-!7??C773s8OCEm n  		s#   /H?G=H/ /
H<9H?;H<<H?c                      SU ;   a  SU ;   a  gg g )Nr{   r|   皙?rn   r   s    rt   analyse_textErbLexer.analyse_text   s    4<DDL )<rv   )rp   N)__name__
__module____qualname____firstlineno____doc__nameurlaliases	mimetypesversion_addedrecompileMr}   rq   r   r   __static_attributes__rn   rv   rt   r*   r*   3   sM     D
'CgG01IM

H"$$OI(
BHrv   r*   c                   F   \ rS rSrSrSrSrS/rS/rS/r	Sr
\R                  \R                  -  rS	\4S
\" \R$                  \\R$                  5      4S\" \R$                  \" \SS9\R$                  5      4S\" \R$                  \R,                  \5      S4S\R$                  S4/S\4S\R$                  S4S\R$                  S4S\R0                  4S\R0                  4S\4S\R6                  4S\4S\R<                  4S\R>                  4S\R@                  4/S.r!S r"Sr#g) 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-smartyrk   [^{]+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                    Sn[         R                  " SU 5      (       a  US-  n[         R                  " SU 5      (       a  US-  n[         R                  " SU 5      (       a  US-  n[         R                  " SU 5      (       a  US-  nU$ )N        z\{if\s+.*?\}.*?\{/if\}333333?z\{include\s+file=.*?\}z \{foreach\s+.*?\}.*?\{/foreach\}z	\{\$.*?\}{Gz?r   searchr   rvs     rt   r   SmartyLexer.analyse_text   sw    99.55$JB99.55$JB998$??$JB99\4(($JB	rv   rn   N)$r   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   r   rn   rv   rt   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
rv   r/   c                      \ rS rSrSrSrSrS/rSS/rSr	\
R                  \
R                  -  rS	rS
\4S\" \R$                  \\R$                  5      4S\" \R$                  \5      4S\-   S-   \" \R$                  \R(                  \R$                  \5      S4S\-   S-   \" \R$                  \R(                  \R$                  5      4S\S4/\\R,                  4S\S4S\-   S-   \" \\R,                  5      S4S\S4\" S5      /S\4S\S4S\-   S-   \R(                  4\" S5      /S\4\" S5      S\S4/S\S4S \4S!\4S"\R8                  4S#\R:                  4S$\4S%\4S&\R@                  4S\S4S'\S4S(\S4S\S4S\S4S\S4/S).r!S* r"S+r#g,)-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*.fhtmlrk   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                 l   Sn[         R                  " SU [         R                  5      (       a  US-  n[         R                  " SU [         R                  5      (       a  US-  n[         R                  " SU [         R                  5      (       a  US-  n[         R                  " SU 5      (       a  US-  nU$ )	Nr   z #\{?macro\}?\(.*?\).*?#\{?end\}?      ?z#\{?if\}?\(.+?\).*?#\{?end\}?r   z"#\{?foreach\}?\(.+?\).*?#\{?end\}?z6\$!?\{?[a-zA-Z_]\w*(\([^)]*\))?(\.\w+(\([^)]*\))?)*\}?r   r   r   r   r   s     rt   r   VelocityLexer.analyse_text  s    998$		JJ$JB995tRYYGG$JB99:D"))LL$JB99 0157 7$JB	rv   rn   N)$r   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   r   rn   rv   rt   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rv   rT   c                   L   ^  \ rS rSrSrSrS/rSrSS/rS/r	S	r
U 4S
 jrSrU =r$ )rU   i!  zU
Subclass of the `VelocityLexer` that highlights unlexed data
with the `HtmlLexer`.

zHTML+Velocityzhtml+velocityrk   *.htmlr   ztext/html+velocityr   c                 :   > [         TU ]  " [        [        40 UD6  g N)superrq   r   rT   rr   rs   	__class__s     rt   rq   VelocityHtmlLexer.__init__/      M=W=rv   rn   )r   r   r   r   r   r   r   r   alias_filenamesr   r   rq   r   __classcell__r   s   @rt   rU   rU   !  s=     DGM+O%&I
(C> >rv   rU   c                   R   ^  \ rS rSrSrSrS/rSrSS/rS/r	S	r
U 4S
 jrS rSrU =r$ )rV   i3  zT
Subclass of the `VelocityLexer` that highlights unlexed data
with the `XmlLexer`.

zXML+Velocityzxml+velocityrk   *.xmlr   zapplication/xml+velocityr   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rT   r   s     rt   rq   VelocityXmlLexer.__init__A  s    =<G<rv   c                 `    [         R                  U 5      S-
  n[        U 5      (       a  US-  nU$ Nr   r   )rT   r   r%   r   s     rt   r   VelocityXmlLexer.analyse_textD  s0    ''-4$#IB	rv   rn   r   r   r   r   r   r   r   r   r   r   r   rq   r   r   r   r   s   @rt   rV   rV   3  sB     DGM'O+,I
(C= rv   rV   c                      \ rS rSrSrSrSS/rSS/rSrS	r	\
R                  \
R                  -  rS
\4S\R                   S4S\4S\" \R                   \\\\R                   \\R                   \\\\R                   5      4S\" \R                   \\\\R                   \\R                   \\\\R                   5      4S\" \R                   \\\\R*                  5      S4S\" \R                   \\5      S4S\4/S\" \\\R*                  5      4S\" \\\\\R*                  5      4S\R.                  4S\4S\R0                  4S\R2                  4S\R2                  4S\R6                  4S\R8                  4S\4S\4/S\4S \" \\R                   5      S!4\" S"5      /S\4S#\" \\R                   5      S!4\" S"5      S$\4/S%.r S& r!S'r"g())r4   iK  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/templatesrk   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                     Sn[         R                  " SU 5      b  US-  n[         R                  " SU 5      b  US-  n[         R                  " SU 5      b  US-  nU$ )Nr   z\{%\s*(block|extends)r   z\{%\s*if\s*.*?%\}皙?z\{\{.*?\}\}r   r   s     rt   r   DjangoLexer.analyse_text  s\    99-t4@#IB99)40<#IB99^T*6#IB	rv   rn   N)#r   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   r   rn   rv   rt   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rv   r4   c                      \ rS rSrSrSrSrS/rSS/rS/r	S	r
S
S\4S\" \R                  \\R                  \R                  \" \5      \R                  5      4S\" \R                  \R                  \R                  \" \5      \R                  5      4S\" \R                  \R                  \" \5      \R                  5      4S\" \R                  \R                  \" \5      \R                  5      4S\R                  4S\" \R                  \" \5      \R                  5      4S\4S\" \R                  \" \5      \5      4S\" \\5      4/
0rSrg)r>   i  z\
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
                 )rn   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   Tagr   r   r   r	   r   r"   r   r   r   rn   rv   rt   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%
Frv   r>   c                   D   ^  \ rS rSrSrSrS/rS/rSrSr	U 4S jr
S	rU =r$ )
r?   i  zR
Subclass of the `MyghtyLexer` that highlights unlexed data
with the `HtmlLexer`.
zHTML+Myghtyzhtml+myghtyztext/html+myghtyr  r	  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r>   r   s     rt   rq   MyghtyHtmlLexer.__init__      K;7;rv   rn   r   r   r   r   r   r   r   r   r   r   rq   r   r   r   s   @rt   r?   r?     s2    
 DoG#$I
"CM< <rv   r?   c                   D   ^  \ rS rSrSrSrS/rS/rSrSr	U 4S jr
S	rU =r$ )
r@   i  zQ
Subclass of the `MyghtyLexer` that highlights unlexed data
with the `XmlLexer`.
z
XML+Myghtyz
xml+myghtyzapplication/xml+myghtyr  r	  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r>   r   s     rt   rq   MyghtyXmlLexer.__init__      ;:':rv   rn   r  r   s   @rt   r@   r@     s2    
 DnG)*I
"CM; ;rv   r@   c                   H   ^  \ rS rSrSrSrSS/r/ SQrSrSr	U 4S	 jr
S
rU =r$ )rB   i  zX
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                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r>   r   s     rt   rq   MyghtyJavascriptLexer.__init__      +AArv   rn   r  r   s   @rt   rB   rB     s8    
 D"K0G+I #CMB Brv   rB   c                   D   ^  \ rS rSrSrSrS/rS/rSrSr	U 4S jr
S	rU =r$ )
rA   i   zQ
Subclass of the `MyghtyLexer` that highlights unlexed data
with the `CssLexer`.
z
CSS+Myghtyz
css+myghtyztext/css+myghtyr  r	  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r>   r   s     rt   rq   MyghtyCssLexer.__init__  r  rv   rn   r  r   s   @rt   rA   rA      s2    
 DnG"#I
"CM; ;rv   rA   c                      \ rS rSrSrSrSrS/r/ SQrS/r	Sr
S	S
\4S\" \R                  \R                   \R                  5      4S\" \R                  \\R"                  \R                  \" \5      \R                  5      4S\" \R                  SSS\" \5      \R                  5      4S\" \R                  \R"                  \" \5      \R                  5      4S\" \R                  \R"                  \" \5      \R                  5      4S\R                  4S\" \R                  \" \5      \R                  5      4S\4S\" \R                  \" \5      \5      4S\" \" \5      \5      4/0rS rSrg)rC   i  z`
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                     Sn[         R                  " SU 5      b  SnU$ [         R                  " SU [         R                  5      b  SnU$ )Nr   z</%(class|doc|init)>g      ?z<&.+&>g)\(?r   )r   results     rt   r   MasonLexer.analyse_text=  sH    99,d3?F  YYy$		2>Frv   rn   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   	Multiliner   r   r   r
   r"   r   r   r   r   r   rn   rv   rt   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rv   rC   c                   <   \ rS rSrSrSrSrS/rS/rS/r	Sr
S	\" \R                  \R                  \\5      4S
\" \R                  \R                  \" \5      \5      4S\" \R                  \R(                  \R                  5      4S\R*                  4S\" \R                  \R.                  5      S4S\" \R                  \R.                  \R                  5      4S\R                  S4S\" \R                  \" \5      \R                  5      4S\" \R                  \" \5      \R                  5      4S\" \\5      4S\4/S\R                  4S\R.                  4\" S5      /S\" \R4                  \\5      4S\R                  S4S\4/S\S4S\S4S\S4/S.rSrg )!rD   iF  zX
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   r{   z'(?<=<%)(include|inherit|namespace|page)z((?:\w+)\s*=)(\s*)(".*?")/?\s*>r   ".*?"'.*?'[^\s>]+)r   r1  r   attrrn   N)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    r   r   rn   rv   rt   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Frv   rD   c                   D   ^  \ rS rSrSrSrS/rS/rSrSr	U 4S jr
S	rU =r$ )
rE   i  zP
Subclass of the `MakoLexer` that highlights unlexed data
with the `HtmlLexer`.
z	HTML+Makoz	html+makoztext/html+makor.  r0  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rD   r   s     rt   rq   MakoHtmlLexer.__init__      I99rv   rn   r  r   s   @rt   rE   rE     s2    
 DmG!"I
)CM: :rv   rE   c                   D   ^  \ rS rSrSrSrS/rS/rSrSr	U 4S jr
S	rU =r$ )
rF   i  zO
Subclass of the `MakoLexer` that highlights unlexed data
with the `XmlLexer`.
zXML+Makozxml+makozapplication/xml+makor.  r0  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rD   r   s     rt   rq   MakoXmlLexer.__init__      988rv   rn   r  r   s   @rt   rF   rF     s2    
 DlG'(I
)CM9 9rv   rF   c                   H   ^  \ rS rSrSrSrSS/r/ SQrSrSr	U 4S	 jr
S
rU =r$ )rG   i  zV
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.  r0  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rD   r   s     rt   rq   MakoJavascriptLexer.__init__  s    )?w?rv   rn   r  r   s   @rt   rG   rG     s8    
 D ),G)I *CM@ @rv   rG   c                   D   ^  \ rS rSrSrSrS/rS/rSrSr	U 4S jr
S	rU =r$ )
rH   i  zO
Subclass of the `MakoLexer` that highlights unlexed data
with the `CssLexer`.
zCSS+Makozcss+makoztext/css+makor.  r0  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rD   r   s     rt   rq   MakoCssLexer.__init__  r>  rv   rn   r  r   s   @rt   rH   rH     s2    
 DlG !I
)CM9 9rv   rH   c                       \ rS rSrSrS rSrg)CheetahPythonLexeri  zA
Lexer for handling Cheetah's special $ tokens in Python syntax.
c              #      #    [        S0 U R                  D6nUR                  U5       H6  u  p4nU[        R                  :X  a  US:X  a  [
        R                  nX4U4v   M8     g 7f)N$rn   )r	   rs   r   r#   r   r   r   )rr   r   pylexerpostype_values         rt   r   )CheetahPythonLexer.get_tokens_unprocessed  sW     --!(!?!?!EC#e## "Fs   A"A$rn   N)r   r   r   r   r   r   r   rn   rv   rt   rF  rF    s    $rv   rF  c                   d   \ rS rSrSrSrSrSS/rSS/rS	S
/r	Sr
SS\" \5      4S\4S\R                  4S\R                  4S\" \R                  \" \5      \R                  5      4S\" \R                  \" \5      5      4S\" \R                  \" \5      \R                  5      4S\4S\4/	0rSrg)rJ   i  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-spitfirerk   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   rn   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rF  r"   r   r   r   rn   rv   rt   rJ   rJ     s     D
+C*%G7#I(*BCIM 	w" '*"GOO4)*w.@(A(* (goou-?'@AC%goou-?'@oo'(  TN/
Frv   rJ   c                   H   ^  \ rS rSrSrSr/ SQrSS/rSrSr	U 4S	 jr
S
rU =r$ )rK   i  zS
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+spitfirerP  rk   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rJ   r   s     rt   rq   CheetahHtmlLexer.__init__  s    L<G<rv   rn   r  r   s   @rt   rK   rK     s3    
 D>G$&:;I
+CM= =rv   rK   c                   H   ^  \ rS rSrSrSrSS/rSS/rSrS	r	U 4S
 jr
SrU =r$ )rL   i  zR
Subclass of the `CheetahLexer` that highlights unlexed data
with the `XmlLexer`.
zXML+Cheetahzxml+cheetahzxml+spitfirezapplication/xml+cheetahzapplication/xml+spitfirerP  rk   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rJ   r   s     rt   rq   CheetahXmlLexer.__init__"      <;7;rv   rn   r  r   s   @rt   rL   rL     s8    
 Dn-G*,FGI
+CM< <rv   rL   c                   H   ^  \ rS rSrSrSr/ SQr/ SQrSrSr	U 4S jr
S	rU =r$ )
rM   i&  zY
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+spitfirerP  rk   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rJ   r   s     rt   rq   CheetahJavascriptLexer.__init__8  s    ,B'Brv   rn   r  r   s   @rt   rM   rM   &  s5    
  D5G-I ,CMC Crv   rM   c                   Z   \ rS rSrSrSrSrS/rSS/rSr	S	\
4S
\" \\5      4S\" \\R                  5      S4\" S5      S\
4/S\S4S\" \5      S4S\" \\\" \5      5      S4S\S4S\" \\\5      S4/S\" \R                  \" \5      \R                  5      4S\R(                  4/S.rSrg)r;   i<  z0
A lexer that highlights genshi text templates.
zGenshi Texthttps://genshi.edgewall.org/
genshitextzapplication/x-genshi-textztext/x-genshirk   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   ra  r   rn   N)r   r   r   r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r	   r   r   r   r   r   rn   rv   rt   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,]]
!Frv   r;   c                      \ rS rSrSr\R                  rS\4S\	" \
R                  \" \5      \
R                  5      4S\4S\R                  S4S\R                  S	4\" S
5      S\4/S\4S\R$                  S4S\R                  S4/S\	" \\" \5      \5      S4S\	" \\" \5      \5      S4S\S4/S\4S\R$                  S4S\R$                  S4S\R                  S4/S\S4S\S4S\S4/S\S4\" S5      S\4/S\S4\" S5      S\4/S\4\" S
5      /S\	" \
R                  \" \5      \
R                  5      4S\R(                  4/S.	rS rg!)"GenshiMarkupLexeri`  zL
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*=pyattrr2  r   z(")(.*?)(")z(')(.*?)(')r5  zpy:[\w-]+\s*=r6  "attr-dstring'attr-sstringz[^\s>]*stringsz[^"'$]+rb  z(?<!\$)(\$)([a-zA-Z_][\w\.]*))	r   re  rf  r   r6  rh  rj  rk  r   rn   N)r   r   r   r   r   r   r   r   r"   r   r   r   r   r	   r   r  r   r   r   r    r   r   r   rn   rv   rt   rd  rd  `  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Frv   rd  c                   T   ^  \ rS rSrSrSrSS/rSr/ SQrS/r	S	r
U 4S
 jrS rSrU =r$ )r:   i  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+kidrk   r   *.htm*.xhtmlztext/html+genshir_  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rd  r   s     rt   rq   HtmlGenshiLexer.__init__  s    $5AArv   c                     Sn[         R                  " SU 5      b  US-  n[         R                  " SU 5      b  US-  nU[        R                  " U 5      -   S-
  $ Nr   z	\$\{.*?\}皙?zpy:(.*?)=["\']r   )r   r   r   r   r   s     rt   r   HtmlGenshiLexer.analyse_text  sW    99\4(4#IB99&-9#IBI**400477rv   rn   r   r   s   @rt   r:   r:     s@    
 Dj)GM4O#$I
(CB8 8rv   r:   c                   Z   ^  \ rS rSrSrSr/ SQrS/rSrS/r	SS	/r
S
rU 4S jrS rSrU =r$ )r9   i  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*.kidrk   r   zapplication/x-genshizapplication/x-kidr_  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rd  r   s     rt   rq   GenshiLexer.__init__  s    #4@@rv   c                     Sn[         R                  " SU 5      b  US-  n[         R                  " SU 5      b  US-  nU[        R                  " U 5      -   S-
  $ rs  )r   r   r   r   r   s     rt   r   GenshiLexer.analyse_text  sW    99\4(4#IB99&-9#IBH))$//$66rv   rn   r   r   r   r   r   r   r   r   r   r   r   r   rq   r   r   r   r   s   @rt   r9   r9     sG    
 D8G	IMiO')<=I
(CA7 7rv   r9   c                   T   ^  \ rS rSrSrSr/ SQrSrS/r/ SQr	Sr
U 4S	 jrS
 rSrU =r$ )r=   i  zC
A lexer that highlights javascript code in genshi text templates.
zJavaScript+Genshi Text)zjs+genshitextz	js+genshizjavascript+genshitextzjavascript+genshirk   *.js)zapplication/x-javascript+genshiztext/x-javascript+genshiztext/javascript+genshihttps://genshi.edgewall.orgc                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r;   r   s     rt   rq   JavascriptGenshiLexer.__init__  s    /EWErv   c                 2    [         R                  U 5      S-
  $ N皙?r9   r   r   s    rt   r   "JavascriptGenshiLexer.analyse_text      ''-44rv   rn   r   r   s   @rt   r=   r=     s@     $D$GMhO+I (CF5 5rv   r=   c                   R   ^  \ rS rSrSrSrSS/rSrS/rS/r	S	r
U 4S
 jrS rSrU =r$ )r<   i  zC
A lexer that highlights CSS definitions in genshi text templates.
zCSS+Genshi Textzcss+genshitextz
css+genshirk   *.cssztext/css+genshir  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r;   r   s     rt   rq   CssGenshiLexer.__init__  s    ?>g>rv   c                 2    [         R                  U 5      S-
  $ r  r  r   s    rt   r   CssGenshiLexer.analyse_text  r  rv   rn   r   r   s   @rt   r<   r<     sA     D.GMiO"#I
'C?5 5rv   r<   c                   Z   ^  \ rS rSrSrSr/ SQrS/rSr/ SQr	S/r
S	rU 4S
 jrS rSrU =r$ )r+   i  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*.rhtmlrk   rm  ztext/html+rubyri   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r*   r   s     rt   rq   RhtmlLexer.__init__      H88rv   c                 `    [         R                  U 5      S-
  n[        U 5      (       a  US-  nU$ Nr   g      ?)r*   r   r$   r   s     rt   r   RhtmlLexer.analyse_text  s0    ""4(4/%%#IB	rv   rn   r~  r   s   @rt   r+   r+     sA     D0GIM4O!"I
'C9 rv   r+   c                   R   ^  \ rS rSrSrSrSS/rSrS/rS/r	S	r
U 4S
 jrS rSrU =r$ )r,   i  zc
Subclass of `ErbLexer` which highlights data outside preprocessor
directives with the `XmlLexer`.
zXML+Rubyzxml+rubyzxml+erbrk   r   zapplication/xml+rubyri   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r*   r   s     rt   rq   XmlErbLexer.__init__%      87w7rv   c                 `    [         R                  U 5      S-
  n[        U 5      (       a  US-  nU$ r   )r*   r   r%   r   s     rt   r   XmlErbLexer.analyse_text(  s0    ""4(4/$#IB	rv   rn   r   r   s   @rt   r,   r,     sA    
 D9%GMiO'(I
'C8 rv   r,   c                   R   ^  \ rS rSrSrSrSS/rSrS/rS/r	S	r
U 4S
 jrS rSrU =r$ )r-   i/  zK
Subclass of `ErbLexer` which highlights unlexed data with the `CssLexer`.
zCSS+Rubyzcss+rubyzcss+erbrk   r  ztext/css+rubyri   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r*   r   s     rt   rq   CssErbLexer.__init__;  r  rv   c                 2    [         R                  U 5      S-
  $ r  r*   r   r   s    rt   r   CssErbLexer.analyse_text>      $$T*T11rv   rn   r   r   s   @rt   r-   r-   /  sA     D9%GMiO !I
'C82 2rv   r-   c                   T   ^  \ rS rSrSrSr/ SQrSrS/r/ SQr	Sr
U 4S	 jrS
 rSrU =r$ )r.   iB  zR
Subclass of `ErbLexer` which highlights unlexed data with the
`JavascriptLexer`.
zJavaScript+Ruby)zjavascript+rubyzjs+rubyzjavascript+erbzjs+erbrk   r  )zapplication/x-javascript+rubyztext/x-javascript+rubyztext/javascript+rubyri   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r*   r   s     rt   rq   JavascriptErbLexer.__init__Q      (>g>rv   c                 2    [         R                  U 5      S-
  $ r  r  r   s    rt   r   JavascriptErbLexer.analyse_textT  r  rv   rn   r   r   s   @rt   r.   r.   B  s=    
 DHGMhO)I (C?2 2rv   r.   c                   Z   ^  \ rS rSrSrSrS/rS/rSr/ SQr	/ SQr
S	rU 4S
 jrS rSrU =r$ )r&   iX  z|
Subclass of `PhpLexer` that highlights unhandled data with the `HtmlLexer`.

Nested Javascript and CSS is highlighted too.
zHTML+PHPzhtml+phpz*.phtmlrk   )*.phpr   rn  ro  
*.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                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r   r   s     rt   rq   HtmlPhpLexer.__init__k  r  rv   c                 b    [         R                  " U 5      S-
  n[        U 5      (       a  US-  nU$ r  )r   r   r$   r   s     rt   r   HtmlPhpLexer.analyse_textn  s0    ""4(4/%%#IB	rv   rn   r~  r   s   @rt   r&   r&   X  sG     DlGIM%OII  C9 rv   r&   c                   R   ^  \ rS rSrSrSrS/rSr/ SQrS/r	Sr
U 4S	 jrS
 rSrU =r$ )r'   iu  zL
Subclass of `PhpLexer` that highlights unhandled data with the `XmlLexer`.
zXML+PHPzxml+phprk   )r   r  r  zapplication/xml+phpr  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r   r   s     rt   rq   XmlPhpLexer.__init__  r  rv   c                 b    [         R                  " U 5      S-
  n[        U 5      (       a  US-  nU$ r   )r   r   r%   r   s     rt   r   XmlPhpLexer.analyse_text  s0    ""4(4/$#IB	rv   rn   r   r   s   @rt   r'   r'   u  s<     DkGM6O&'I
C8 rv   r'   c                   P   ^  \ rS rSrSrSrS/rSrS/rS/r	Sr
U 4S	 jrS
 rSrU =r$ )r(   i  zM
Subclass of `PhpLexer` which highlights unmatched data with the `CssLexer`.
zCSS+PHPzcss+phprk   r  ztext/css+phpr  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r   r   s     rt   rq   CssPhpLexer.__init__  r  rv   c                 4    [         R                  " U 5      S-
  $ r  r   r   r   s    rt   r   CssPhpLexer.analyse_text  s    $$T*T11rv   rn   r   r   s   @rt   r(   r(     s>     DkGMiO I
C82 2rv   r(   c                   T   ^  \ rS rSrSrSrSS/rSrS/r/ SQr	S	r
U 4S
 jrS rSrU =r$ )r)   i  zT
Subclass of `PhpLexer` which highlights unmatched data with the
`JavascriptLexer`.
zJavaScript+PHPzjavascript+phpzjs+phprk   r  )zapplication/x-javascript+phpztext/x-javascript+phpztext/javascript+phpr  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r   r   s     rt   rq   JavascriptPhpLexer.__init__  r  rv   c                 .    [         R                  " U 5      $ r   r  r   s    rt   r   JavascriptPhpLexer.analyse_text  s    $$T**rv   rn   r   r   s   @rt   r)   r)     sB    
 D*GMhO(I  C?+ +rv   r)   c                   R   ^  \ rS rSrSrSrS/rSr/ SQrS/r	Sr
U 4S	 jrS
 rSrU =r$ )r0   i  z
Subclass of the `SmartyLexer` that highlights unlexed data with the
`HtmlLexer`.

Nested Javascript and CSS is highlighted too.
zHTML+Smartyzhtml+smartyrk   )r   rn  ro  r   ztext/html+smartyr   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r/   r   s     rt   rq   HtmlSmartyLexer.__init__  r  rv   c                 `    [         R                  U 5      S-
  n[        U 5      (       a  US-  nU$ r  )r/   r   r$   r   s     rt   r   HtmlSmartyLexer.analyse_text  0    %%d+d2%%#IB	rv   rn   r   r   s   @rt   r0   r0     s<     DoGM=O#$I
#C< rv   r0   c                   R   ^  \ rS rSrSrSrS/rSrSS/rS/r	S	r
U 4S
 jrS rSrU =r$ )r1   i  zQ
Subclass of the `SmartyLexer` that highlights unlexed data with the
`XmlLexer`.
z
XML+Smartyz
xml+smartyrk   r   r   zapplication/xml+smartyr   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r/   r   s     rt   rq   XmlSmartyLexer.__init__  r  rv   c                 `    [         R                  U 5      S-
  n[        U 5      (       a  US-  nU$ r   )r/   r   r%   r   s     rt   r   XmlSmartyLexer.analyse_text  0    %%d+d2$#IB	rv   rn   r   r   s   @rt   r1   r1     sA    
 DnGM(O)*I
#C; rv   r1   c                   R   ^  \ rS rSrSrSrS/rSrSS/rS/r	S	r
U 4S
 jrS rSrU =r$ )r2   i  zQ
Subclass of the `SmartyLexer` that highlights unlexed data with the
`CssLexer`.
z
CSS+Smartyz
css+smartyrk   r  r   ztext/css+smartyr   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r/   r   s     rt   rq   CssSmartyLexer.__init__  r  rv   c                 2    [         R                  U 5      S-
  $ r  r/   r   r   s    rt   r   CssSmartyLexer.analyse_text  r  rv   rn   r   r   s   @rt   r2   r2     sA    
 DnGM(O"#I
#C;5 5rv   r2   c                   V   ^  \ rS rSrSrSrSS/rSrSS/r/ S	Qr	S
r
U 4S jrS rSrU =r$ )r3   i  zX
Subclass of the `SmartyLexer` that highlights unlexed data with the
`JavascriptLexer`.
zJavaScript+Smartyzjavascript+smartyz	js+smartyrk   r  r   )zapplication/x-javascript+smartyztext/x-javascript+smartyztext/javascript+smartyr   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r/   r   s     rt   rq   JavascriptSmartyLexer.__init__  r  rv   c                 2    [         R                  U 5      S-
  $ r  r  r   s    rt   r   "JavascriptSmartyLexer.analyse_text
  r  rv   rn   r   r   s   @rt   r3   r3     sF    
 D"K0GMw'O+I $CB5 5rv   r3   c                   ^   ^  \ rS rSrSrSr/ SQr/ SQrSr/ SQr	SS	/r
S
rU 4S jrS rSrU =r$ )r5   i  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.jinja2rk   rm  ztext/html+djangoztext/html+jinjar   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r4   r   s     rt   rq   HtmlDjangoLexer.__init__  r  rv   c                 `    [         R                  U 5      S-
  n[        U 5      (       a  US-  nU$ r  )r4   r   r$   r   s     rt   r   HtmlDjangoLexer.analyse_text!  r  rv   rn   r~  r   s   @rt   r5   r5     sB     D9GjIM4O#%67I
AC< rv   r5   c                   \   ^  \ rS rSrSrSrSS/rSS/rSrS	/r	S
S/r
SrU 4S jrS rSrU =r$ )r7   i(  zQ
Subclass of the `DjangoLexer` that highlights unlexed data with the
`XmlLexer`.
zXML+Django/Jinjaz
xml+djangoz	xml+jinjaz*.xml.j2z*.xml.jinja2rk   r   zapplication/xml+djangozapplication/xml+jinjar   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r4   r   s     rt   rq   XmlDjangoLexer.__init__6  r  rv   c                 `    [         R                  U 5      S-
  n[        U 5      (       a  US-  nU$ r   )r4   r   r%   r   s     rt   r   XmlDjangoLexer.analyse_text9  r  rv   rn   r~  r   s   @rt   r7   r7   (  sN    
 D[)G^,IMiO)+BCI
AC; rv   r7   c                   \   ^  \ rS rSrSrSrSS/rSS/rSrS	/r	S
S/r
SrU 4S jrS rSrU =r$ )r6   i@  zQ
Subclass of the `DjangoLexer` that highlights unlexed data with the
`CssLexer`.
zCSS+Django/Jinjaz
css+djangoz	css+jinjaz*.css.j2z*.css.jinja2rk   r  ztext/css+djangoztext/css+jinjar   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r4   r   s     rt   rq   CssDjangoLexer.__init__N  r  rv   c                 2    [         R                  U 5      S-
  $ r  r4   r   r   s    rt   r   CssDjangoLexer.analyse_textQ  r  rv   rn   r~  r   s   @rt   r6   r6   @  sN    
 D[)G^,IMiO"$45I
AC;5 5rv   r6   c                   \   ^  \ rS rSrSrSr/ SQrSS/rSrS/r	/ S	Qr
S
rU 4S jrS rSrU =r$ )r8   iU  zX
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.jinja2rk   r  )zapplication/x-javascript+djangozapplication/x-javascript+jinjaztext/x-javascript+djangoztext/x-javascript+jinjaztext/javascript+djangoztext/javascript+jinjar   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r4   r   s     rt   rq   JavascriptDjangoLexer.__init__i  r  rv   c                 2    [         R                  U 5      S-
  $ r  r  r   s    rt   r   "JavascriptDjangoLexer.analyse_textl  r  rv   rn   r~  r   s   @rt   r8   r8   U  sK    
 %D/GM*IMhO*I BCB5 5rv   r8   c                   V    \ rS rSrSrS\S4S\4S\4S\4/S\S	4S
\" \5      4/S.r	Sr
g)JspRootLexerip  zd
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).*?>[^<]+<r|   r   [\w\W]+?(?=%>|\Z)r   r  rn   N)r   r   r   r   r   r   r"   r   r   r   r   rn   rv   rt   r  r  p  sW     w&Su5M
 GV$!5#34
Frv   r  c                   P   ^  \ rS rSrSrSrS/rS/rS/rSr	Sr
U 4S	 jrS
 rSrU =r$ )rI   i  z
Lexer for Java Server Pages.
zJava Server Pagejspz*.jspzapplication/x-jspz.https://projects.eclipse.org/projects/ee4j.jspr0  c                 :   > [         TU ]  " [        [        40 UD6  g r   r   rq   r   r  r   s     rt   rq   JspLexer.__init__  rZ  rv   c                     [         R                  " U 5      S-
  n[        U 5      (       a  US-  nSU ;   a  SU ;   a  US-  nU$ Nr   r   r{   r|   r   )r   r   r%   r   s     rt   r   JspLexer.analyse_text  sF    ##D)D0$#IB4<DDL#IB	rv   rn   r   r   r   r   r   r   r   r   r   r   r   rq   r   r   r   r   s   @rt   rI   rI     s>     DgG	I$%I
:CM< rv   rI   c                   "   \ rS rSrSrSrS/rS/rS/rSr	Sr
\R                  rS	\4S
\R                   S4S\4S\R                   4S\" \\R(                  \S\\5      4S\" \\R(                  \S\\" \5      \5      4S\" \\R(                  \S\" \5      \5      4S\" \\R(                  5      4S\" \S\" \5      \R(                  SS\5      4S\4/
S\R                   4S
\R                   S4S\R                   S4S\R                   4/S.rS rSrg)rN   i  z/
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                     SU ;   a  gg)z.Evoque templates use $evoque, which is unique.z$evoquerx   Nrn   r   s    rt   r   EvoqueLexer.analyse_text  s     rv   rn   )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   rn   rv   rt   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rv   rN   c                   P   ^  \ rS rSrSrSrS/rS/rS/rSr	Sr
U 4S	 jrS
 rSrU =r$ )rO   i  zR
Subclass of the `EvoqueLexer` that highlights unlexed data with the
`HtmlLexer`.
zHTML+Evoquezhtml+evoquer   ztext/html+evoquer  r  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rN   r   s     rt   rq   EvoqueHtmlLexer.__init__  r  rv   c                 ,    [         R                  U 5      $ r   rN   r   r   s    rt   r   EvoqueHtmlLexer.analyse_text      ''--rv   rn   r   r   r   r   r   r   r   r   r   r   r   rq   r   r   r   r   s   @rt   rO   rO     s>     DoGjO#$I
*CM<. .rv   rO   c                   P   ^  \ rS rSrSrSrS/rS/rS/rSr	Sr
U 4S	 jrS
 rSrU =r$ )rP   i  zQ
Subclass of the `EvoqueLexer` that highlights unlexed data with the
`XmlLexer`.
z
XML+Evoquez
xml+evoquer   zapplication/xml+evoquer  r  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rN   r   s     rt   rq   EvoqueXmlLexer.__init__  r  rv   c                 ,    [         R                  U 5      $ r   r  r   s    rt   r   EvoqueXmlLexer.analyse_text  r  rv   rn   r  r   s   @rt   rP   rP     s>     DnGiO)*I
*CM;. .rv   rP   c                      \ rS rSrSrSrS/r/ r/ rSr	Sr
\R                  rS\R                  4S\R                   4S	\4S
\4S\4S\4S\4S\4S\4S\R&                  S4S\R                  4S\4S\4S\R,                  4S\R,                  4S\" \R2                  \\5      4S\R8                  4S\4S\4/S\R&                  4S\R:                  4S\R&                  4S\R&                  4S\R&                  S4/S .rS!rg")#rQ   i  z
Coldfusion statements
cfstatementcfs5https://www.adobe.com/products/coldfusion-family.htmlrk   z//.*?\nz/\*(?:.|\n)*?\*/z\+\+|--z
[-+*/^&=!]z<=|>=|<|>|==zmod\bz"(eq|lt|gt|lte|gte|not|is|and|or)\bz\|\||&&z\?rg  stringr4  \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  rn   N) r   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   r   rn   rv   rt   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#Frv   rQ   c                      \ rS rSrSrSrS/r/ r/ rSr	S\
4\" S5      S\
4/S	\R                  S
4S\4S\R                  S4S\" \R                  \" \5      \R                  5      4S\" \R                  \" \5      \R                  5      4/S\
4S\" \\" \5      \5      4S\R                  S4\" S5      S\
4S\
4/S	\R                  S4S\R                  S4S\R                  4/S.rSrg)ColdfusionMarkupLexeri2  z
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%  rn   N)r   r   r   r   r   r   r   r   r   r   r"   r   r   r+  r   r  r   r   rQ   r   r   r   rn   rv   rt   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->->?
;"Frv   r!  c                   L   ^  \ rS rSrSrSrS/rSS/rS/rSr	S	r
U 4S
 jrSrU =r$ )rR   ia  z
Coldfusion markup in html
zColdfusion HTMLcfmz*.cfmz*.cfmlzapplication/x-coldfusionr  rk   c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r!  r   s     rt   rq   ColdfusionHtmlLexer.__init__l  s    $9EWErv   rn   r   r   r   r   r   r   r   r   r   r   r   rq   r   r   r   s   @rt   rR   rR   a  s>     DgG(#I+,I
ACMF Frv   rR   c                   H   ^  \ rS rSrSrSrS/rS/r/ rSr	Sr
U 4S jrS	rU =r$ )
rS   ip  z%
Coldfusion markup/script components
zColdfusion CFCcfcz*.cfcr  2.0c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   rR   rQ   r   s     rt   rq   ColdfusionCFCLexer.__init__{  s    ,oIIrv   rn   r+  r   s   @rt   rS   rS   p  s8     DgG	II
ACMJ Jrv   rS   c                   P   ^  \ rS rSrSrSrS/rS/rS/rSr	Sr
U 4S	 jrS
 rSrU =r$ )rW   i  z!
Lexer for Scalate Server Pages.
zScalate Server Pagesspz*.sspzapplication/x-sspz"https://scalate.github.io/scalate/r'  c                 :   > [         TU ]  " [        [        40 UD6  g r   r  r   s     rt   rq   SspLexer.__init__  rZ  rv   c                     Sn[         R                  " SU 5      (       a  US-  n[        U 5      (       a  US-  nSU ;   a  SU ;   a  US-  nU$ )Nr   zval \w+\s*:g333333?rt  r{   r|   r   )r   r   r%   r   s     rt   r   SspLexer.analyse_text  sP    99^T**#IB$#IB4<DDL#IB	rv   rn   r  r   s   @rt   rW   rW     s>     !DgG	I$%I
.CM< rv   rW   c                   P    \ rS rSrSrS\S4S\4S\4/S\S4S	\" \5      4/S
.r	Sr
g)TeaTemplateRootLexeri  zo
Base for the `TeaTemplateLexer`. Yields `Token.Other` for area outside of
code blocks.

.. versionadded:: 1.5
r  r  r  r  r|   r   r  r  rn   N)r   r   r   r   r   r   r"   r   r   r   r   rn   rv   rt   r8  r8    sL     w&u5M
 GV$!5#67
Frv   r8  c                   P   ^  \ rS rSrSrSrS/rS/rS/rSr	Sr
U 4S	 jrS
 rSrU =r$ )rX   i  z
Lexer for Tea Templates.
Teateaz*.teaz
text/x-teaz$https://github.com/teatrove/teatrovez1.5c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r8  r   s     rt   rq   TeaTemplateLexer.__init__  s    #7C7Crv   c                     [         R                  " U 5      S-
  n[        U 5      (       a  US-  nSU ;   a  SU ;   a  US-  nU$ r  )r   r   r%   r   s     rt   r   TeaTemplateLexer.analyse_text  sF    &&t,t3$#IB4<DDL#IB	rv   rn   r  r   s   @rt   rX   rX     s>     DgG	II
0CMD rv   rX   c                   T   ^  \ rS rSrSrSrS/rSr/ SQr/ SQr	Sr
U 4S	 jrS
 rSrU =r$ )rY   i  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   rn  ro  *.lasso*.lasso[89]*.incl*.inc*.las)ztext/html+lassozapplication/x-httpd-lassozapplication/x-httpd-lasso[89]https://www.lassosoft.comc                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r   r   s     rt   rq   LassoHtmlLexer.__init__  s    J:':rv   c                 b    [         R                  " U 5      S-
  n[        U 5      (       a  US-  nU$ r  )r   r   r$   r   s     rt   r   LassoHtmlLexer.analyse_text  s0    $$T*T1%%#IB	rv   rn   r   r   s   @rt   rY   rY     s?     DnGM3O2I &C; rv   rY   c                   R   ^  \ rS rSrSrSrS/rSr/ SQrS/r	Sr
U 4S	 jrS
 rSrU =r$ )rZ   i  zS
Subclass of the `LassoLexer` which highlights unhandled data with the
`XmlLexer`.
z	XML+Lassoz	xml+lassorA  )r   rB  rC  rD  rE  rF  zapplication/xml+lassorG  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r   r   s     rt   rq   LassoXmlLexer.__init__  s    :99rv   c                 b    [         R                  " U 5      S-
  n[        U 5      (       a  US-  nU$ r   )r   r   r%   r   s     rt   r   LassoXmlLexer.analyse_text  s0    $$T*T1$#IB	rv   rn   r   r   s   @rt   rZ   rZ     s>    
 DmGM3O()I
%C: rv   rZ   c                   P   ^  \ rS rSrSrSrS/rSrS/rS/r	Sr
U 4S	 jrS
 rSrU =r$ )r[   i  zS
Subclass of the `LassoLexer` which highlights unhandled data with the
`CssLexer`.
z	CSS+Lassoz	css+lassorA  r  ztext/css+lassorG  c                 D   > SUS'   [         TU ]  " [        [        40 UD6  g NTrequiredelimiters)r   rq   r   r   r   s     rt   rq   LassoCssLexer.__init__  s"    '+#$:99rv   c                     [         R                  " U 5      S-
  n[        R                  " SU 5      (       a  US-  nSU ;   a  US-  nU$ )Nr  z
\w+:[^;]+;r   zpadding:)r   r   r   r   r   s     rt   r   LassoCssLexer.analyse_text
  sG    $$T*T199]D))#IB#IB	rv   rn   r   r   s   @rt   r[   r[     s>    
 DmGMiO!"I
%C: rv   r[   c                   T   ^  \ rS rSrSrSrSS/rSrS/r/ SQr	S	r
U 4S
 jrS rSrU =r$ )r\   i  zZ
Subclass of the `LassoLexer` which highlights unhandled data with the
`JavascriptLexer`.
zJavaScript+Lassozjavascript+lassozjs+lassorA  r  )zapplication/x-javascript+lassoztext/x-javascript+lassoztext/javascript+lassorG  c                 D   > SUS'   [         TU ]  " [        [        40 UD6  g rS  )r   rq   r   r   r   s     rt   rq   LassoJavascriptLexer.__init__"  s"    '+#$*@@rv   c                 8    [         R                  " U 5      S-
  nU$ r  )r   r   r   s     rt   r   !LassoJavascriptLexer.analyse_text&  s    $$T*T1	rv   rn   r   r   s   @rt   r\   r\     sC    
 D!:.GMhO*I &CA rv   r\   c                      \ rS rSrSrSrSrS/rSrS\	4S\
4S	\" \
R                  \5      S
4S\" \
R                  \R                   \R                   5      S
4S\" \
R                  \5      S
4/S\4S\
R                  S4S\" \\
R                  5      S4S\" \R                   \5      4S\" \\\5      4S\" \\\R(                  5      4S\" \\\5      S4\" S5      /S\4S\S4S\" \\\R(                  \5      4S\" \\\" \SS95      4S\R2                  4\" S5      /S\R(                  4S\R(                  4S\R(                  4/\" S5      S \R6                  4S!\R8                  4S"\4/S#.rS$rg%)&r]   i+  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   rb  r   rc  rn   N)r   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   r   rn   rv   rt   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<Frv   r]   c                   N   ^  \ rS rSrSrSrS/rSS/rSS/rS	r	S
r
U 4S jrSrU =r$ )r^   iw  zV
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                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r]   r   s     rt   rq   HandlebarsHtmlLexer.__init__  s    O?w?rv   rn   r+  r   s   @rt   r^   r^   w  sB    
 D !G)I')EFI
%CM@ @rv   r^   c                   P   ^  \ rS rSrSrSr/ SQr/ SQrSS/rSr	S	r
U 4S
 jrSrU =r$ )r_   i  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                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r4   r   s     rt   rq   YamlJinjaLexer.__init__  r  rv   rn   r+  r   s   @rt   r_   r_     s7     D+GSI$l3I
-CM< <rv   r_   c                      \ rS rSrSrSrSrS/rS/rSr	0 SS\
4S	\" \\5      S
4S\" \\\" \SS95      S4S\
4/_S
S\R"                  S4S\" \R"                  \5      \" SSS5      4S\" \R"                  \\5      S4S\" \R(                  \\" \SS9\\5      S4S\" \R(                  \\5      S4S\" \R(                  \\5      S4S\" \R"                  S\\5      S4S\" \R(                  S\\5      S4S \" \R(                  \\" \SS9\\5      S!4S"\" \R(                  \5      S#4/
_S\" S5      S$\S4S%\S&4/_S&\" S5      S$\S'4S(\" \R,                  \\5      S)4/_S)S%\S4\" S*5      \" S+5      /_S\" S5      \" S5      S,\" \" \SS9\\\\" \SS9\\5      4S-\4S.\R0                  4S/\" \" \SS9\\R0                  \\" \SS95      4\" S5      \" S5      /_S0\" S5      \" S15      /_S2S3\" \\S\5      S4S4\" \\R0                  \5      S4/_S*S$\S4/_SS5\S'4/_S1S6\S4/_S7\" S5      S8\" \R2                  \\5      4S9\" \\\" \SS9\\5      4\" S:5      \" S;5      \" S<5      S=\4/_S+\" S75      S>\
4/_S?\" S75      \" S5      S>\
4/_S#S5\S'4\" S+5      /_S!S5\S'4\" S?5      /_S<S@\R4                  4/_SA\R6                  4SB\4/SC\R:                  4SD\R<                  4/SE\R@                  4SF\RB                  4/\" S<5      \" S:5      \" S;5      \" S5      /SG\4/SH\" \\\R(                  \\5      S'4S>\"4/S\
4SI\" \\\R(                  \\5      S4S\
4/SJ.Er#SKr$g)Lr`   i  z
Lexer for Liquid templates.
liquidz.https://www.rubydoc.info/github/Shopify/liquidz*.liquidr.  r   r   z
(\{%)(\s*)ztag-or-blockz(\{\{)(\s*)([^\s}]+)rc  rd  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  rx  rc  rs  r  rt  rn   )%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   r   rn   rv   rt   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@Frv   r`   c                      \ rS rSrSrSrS/rS/rSrSr	\
R                  \
R                  -  rSrS	rS
\-   S-   r\\-   rS\4S\R(                  S4S\4S\" \R(                  \\\\R(                  \\R(                  \\\\R(                  5      4S\" \R(                  \\\\R(                  \\R(                  \\\\R(                  5      4S\ S3\" \R(                  \\\\R2                  5      S4S\" \R(                  \\5      S4S\4/S\ S3\" \\\R2                  5      4S\ S3\" \\\\\R2                  5      4S\R6                  4S\4S\R8                  4\\R:                  4S\-   \R:                  4S\4S\R@                  4S\RB                  4S \4S!\4/S"\4S#\" \\R(                  5      S$4\"" S%5      /S"\4S&\" \\R(                  5      S$4\"" S%5      S'\#4/S(.r$S)r%g*)+ra   ih  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   rn   N)&r   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   r   rn   rv   rt   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Frv   ra   c                   J   ^  \ rS rSrSrSrS/rS/rS/rSr	Sr
U 4S	 jrS
rU =r$ )rb   i  zP
Subclass of the `TwigLexer` that highlights unlexed data with the
`HtmlLexer`.
z	HTML+Twigz	html+twigz*.twigztext/html+twigr  r.  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   ra   r   s     rt   rq   TwigHtmlLexer.__init__  r:  rv   rn   r+  r   s   @rt   rb   rb     s9    
 DmG
I!"I
$CM: :rv   rb   c                       \ rS rSrSrSrSrS/rSrS\	4S\
" \R                  \5      S	4S
\
" \\R                   \\\\5      S4S\
" \\R                   \\5      4S\
" \\R                   \\\5      S4S\
" \\R                   \5      4/S\4S\R                  S4S\R&                  4S\R(                  4S\R*                  4S\4S\R.                  4S\R.                  4S\
" \\\\\\\\5      4/	S\S4S\S4S\S4/S.rSrg)rc   i  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	[^{([*#]+ra  ngExpressionz&([([]+)([\w:.-]+)([\])]+)(\s*)(=)(\s*)r6  z([([]+)([\w:.-]+)([\])]+)(\s*)z([*#])([\w:.-]+)(\s*)(=)(\s*)z([*#])([\w:.-]+)(\s*)z\s+(\|\s+)?ru  r   z:?(true|false)r   r   r   z[a-zA-Z][\w-]*(\(.*\))?z\.[\w-]+(\(.*\))?z-(\?)(\s*)([^}\s]+)(\s*)(:)(\s*)([^}\s]+)(\s*)r3  r4  r5  )r   r  r6  rn   N)r   r   r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r   r   r    Booleanr   r   r!   r   r   r   rn   rv   rt   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-Frv   rc   c                   D   ^  \ rS rSrSrSrS/rS/rSrSr	U 4S jr
S	rU =r$ )
rd   i
	  zT
Subclass of the `Angular2Lexer` that highlights unlexed data with the
`HtmlLexer`.
zHTML + Angular2zhtml+ng2z*.ng2r  r.  c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   rc   r   s     rt   rq   Angular2HtmlLexer.__init__	  r   rv   rn   )r   r   r   r   r   r   r   r   r   r   rq   r   r   r   s   @rt   rd   rd   
	  s1    
 DlG	I
4CM> >rv   rd   c                   L   ^  \ rS rSrSrSrS/r/ SQrSrSr	U 4S jr
S	 rS
rU =r$ )re   i	  z
Templated SQL lexer.
z	SQL+Jinjaz	sql+jinja)z*.sqlz*.sql.j2z*.sql.jinja2rl  z2.13c                 :   > [         TU ]  " [        [        40 UD6  g r   )r   rq   r   r4   r   s     rt   rq   SqlJinjaLexer.__init__%	  r  rv   c                     Sn[         R                  " SU 5      (       a  US-  n[         R                  " SU 5      (       a  US-  n[         R                  " SU 5      (       a  US-  nU$ )Nr   z\{\{\s*ref\(.*\)\s*\}\}r   z\{\{\s*source\(.*\)\s*\}\}r   z\{%-?\s*macro \w+\(.*\)\s*-?%\}r   r   r   s     rt   r   SqlJinjaLexer.analyse_text(	  s]    99/66#IB992D99$JB997>>$JB	rv   rn   )r   r   r   r   r   r   r   r   r   r   rq   r   r   r   r   s   @rt   re   re   	  s4     DmG5I
-CM; rv   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   rF  rJ   rK   rL   rM   r;   rd  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   r8  rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rn   rv   rt   <module>r     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 rv   