
    |e"                        d Z ddlZddl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 ddlmZmZmZmZ ddlmZ g d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y)a  
    pygments.lexers.ul4
    ~~~~~~~~~~~~~~~~~~~

    Lexer for the UL4 templating language.

    More information: https://python.livinglogic.de/UL4.html

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)
RegexLexerDelegatingLexerbygroupswordsinclude)	CommentTextKeywordStringNumberLiteralNameOtherOperator)	HtmlLexerXmlLexerCssLexerJavascriptLexer)PythonLexer)UL4LexerHTMLUL4LexerXMLUL4LexerCSSUL4LexerJavascriptUL4LexerPythonUL4Lexerc                      e Zd ZdZej
                  ej                  z  ZdZdgZ	dgZ
d eej                  ej                  eej                  ej                        fd eej                  ej                  eej                  ej$                        dfdefdej(                  fd	ed
fd eej                  ej                  eej                  ej$                        dfd eej                  ej                  e      dfd eej                  ej                  e      dfd eej                  ej                  e      dfdefdefgd	edfdedfdefdefgdej                  dfdedfdedfdedfdedfd ej.                  fd!ej.                  fd"ej.                  fd#ej0                  fd$ej2                  fd%ej4                  fd&ej8                  fd'ej:                  fd(ej:                  fd)ej:                  fd*ej<                  fd+ef e d,d-.      ef e d/d-.      ejB                  fd0efd1ej                  fgdej                  df e d2d-.      efd1efgdej                  df e d3d-.      ej                  fd1ej                  fgd4ejD                  fd5ejD                  fd6ejD                  fd7ejD                  fgdedf e#d8      d9efdefgdedf e#d8      d:efdefgdedf e#d8      d9efdefgdedf e#d8      d:efdefgd;
Z$y<)=r   z<
    Generic lexer for UL4.

    .. versionadded:: 2.12
    UL4ul4z*.ul4z(<\?)(\s*)(ul4)(\s*)(\?>)z-(<\?)(\s*)(ul4)(\s*)([a-zA-Z_][a-zA-Z_0-9]*)?z<\?\s*note\s.*?\?>z<\?\s*doc\s.*?\?>z<\?\s*ignore\s*\?>ignorez-(<\?)(\s*)(def)(\s*)([a-zA-Z_][a-zA-Z_0-9]*)?zK(<\?)(\s*)(printx|print|for|if|elif|else|while|code|renderblocks?|render)\bz(<\?)(\s*)(end)\bendz(<\?)(\s*)(whitespace)\b
whitespacez[^<]+<z#pushz<\?\s*end\s+ignore\s*\?>z#pop.z\?>z'''string13z"""string23'string1"string2z\d+\.\d*([eE][+-]?\d+)?z\.\d+([eE][+-]?\d+)?z\d+[eE][+-]?\d+z
0[bB][01]+z0[oO][0-7]+z0[xX][0-9a-fA-F]+z9@\(\d\d\d\d-\d\d-\d\d(T(\d\d:\d\d(:\d\d(\.\d{6})?)?)?)?\)z#[0-9a-fA-F]{8}z#[0-9a-fA-F]{6}z#[0-9a-fA-F]{3,4}z\d+zS//|==|!=|>=|<=|<<|>>|\+=|-=|\*=|/=|//=|<<=|>>=|&=|\|=|^=|=|[\[\]{},:*/().~%&|<>^+-])forinifelsenotisandorz\b)suffix)NoneFalseTruez[a-zA-Z_][a-zA-Z0-9_]*z\s+)r*   r,   defwhilerenderblockrenderblocks)keepstripsmartz\\[\\'"abtnfr]z\\x[0-9a-fA-F]{2}z\\u[0-9a-fA-F]{4}z\\U[0-9a-fA-F]{8}stringescapesz[^\\']+z[^\\"]+)
rootr   r   r    r!   r=   r$   r%   r'   r)   N)%__name__
__module____qualname____doc__re	MULTILINEDOTALLflagsnamealiases	filenamesr   r   Preprocr	   
Whitespacer
   r   Functionr   Docr   r   FloatBinOctHexr   DateColorIntegerr   r   ConstantEscaper   tokens     5/usr/lib/python3/dist-packages/pygments/lexers/ul4.pyr   r      s    LL299$EDgG	I -$//7'//;	 A$//7$--9 &	 %

	 & A$//7$--9 _$//7C	 %$//7C ,$//7C	 u5MCB
L #GW5('6:w7O
 W__f-FJ'FJ'&)$&)$'6$fll3.FJJ'VZZ(!6::.I7<<X//!7==1V^^$cemnHQVWY`a,U;W=M=MN&-T__%I%
P W__f-OX]^`ghTN
 W__f--e<gooNT__%
 #FMM2!6==1!6==1!6==1	
 VV$O$ 6N	
 VV$O$ 6N	
 66"O$ 6N	
 66"O$ 6N	
eFrY   r   c                   2     e Zd ZdZdZdgZdgZ fdZ xZS )r   z)
    Lexer for UL4 embedded in HTML.
    zHTML+UL4zhtml+ul4z	*.htmlul4c                 8    t        |   t        t        fi | y N)super__init__r   r   selfoptions	__class__s     rZ   r_   zHTMLUL4Lexer.__init__   s    H88rY   	r?   r@   rA   rB   rG   rH   rI   r_   __classcell__rc   s   @rZ   r   r      s'     DlGI9 9rY   r   c                   2     e Zd ZdZdZdgZdgZ fdZ xZS )r   z(
    Lexer for UL4 embedded in XML.
    zXML+UL4zxml+ul4z*.xmlul4c                 8    t        |   t        t        fi | y r]   )r^   r_   r   r   r`   s     rZ   r_   zXMLUL4Lexer.__init__       87w7rY   rd   rf   s   @rZ   r   r      '     DkGI8 8rY   r   c                   2     e Zd ZdZdZdgZdgZ fdZ xZS )r   z(
    Lexer for UL4 embedded in CSS.
    zCSS+UL4zcss+ul4z*.cssul4c                 8    t        |   t        t        fi | y r]   )r^   r_   r   r   r`   s     rZ   r_   zCSSUL4Lexer.__init__   ri   rY   rd   rf   s   @rZ   r   r      rj   rY   r   c                   2     e Zd ZdZdZdgZdgZ fdZ xZS )r   z/
    Lexer for UL4 embedded in Javascript.
    zJavascript+UL4zjs+ul4z*.jsul4c                 8    t        |   t        t        fi | y r]   )r^   r_   r   r   r`   s     rZ   r_   zJavascriptUL4Lexer.__init__   s    (>g>rY   rd   rf   s   @rZ   r   r      s'     DjGI? ?rY   r   c                   2     e Zd ZdZdZdgZdgZ fdZ xZS )r   z+
    Lexer for UL4 embedded in Python.
    z
Python+UL4zpy+ul4z*.pyul4c                 8    t        |   t        t        fi | y r]   )r^   r_   r   r   r`   s     rZ   r_   zPythonUL4Lexer.__init__
  s    h:':rY   rd   rf   s   @rZ   r   r     s'     DjGI; ;rY   r   ) rB   rC   pygments.lexerr   r   r   r   r   pygments.tokenr   r	   r
   r   r   r   r   r   r   pygments.lexers.webr   r   r   r   pygments.lexers.pythonr   __all__r   r   r   r   r   r   rX   rY   rZ   <module>rv      s   
 
 P P   N N .3rz rh
9? 
9
8/ 
8
8/ 
8
? 
?
;_ 
;rY   