
    Mh)                     .   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dS )z
    pygments.lexers.ul4
    ~~~~~~~~~~~~~~~~~~~

    Lexer for the UL4 templating language.

    :copyright: Copyright 2006-2025 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                   4   e Zd ZdZej        ej        z  ZdZdgZ	dgZ
dZd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d
fdefdej        d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dfdedfdefdefgdej        dfdej        dfdej        fdej        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j        fd,ej        fd-ej        fd.ej        fd/ej        fd0ej        fd1ej        fd2ej         fd3e!f e"d4d56          ef e"d7d56          ej#        fd8efd9ej        fgdej        df e"d:d56          efd9efgdej        df e"d;d56          ej        fd9ej        fgd<ej$        fd=ej$        fd>ej$        fd?ej$        fgd edf e%d@          dAefdefgd"edf e%d@          dBefdefgd$edf e%d@          dAefdefgd&edf e%d@          dBefdefgdCZ&dDS )Er   z 
    Generic lexer for UL4.
    UL4ul4z*.ul4&https://python.livinglogic.de/UL4.htmlz2.12z(<\?)(\s*)(ul4)(\s*)(\?>)z-(<\?)(\s*)(ul4)(\s*)([a-zA-Z_][a-zA-Z_0-9]*)?z<\?\s*note\s*\?>notez<\?\s*note\s.*?\?>z<\?\s*doc\s*\?>docz<\?\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<\?\s*end\s+note\s*\?>z<\?\s*end\s+doc\s*\?>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(   r*   r,   N)'__name__
__module____qualname____doc__re	MULTILINEDOTALLflagsnamealiases	filenamesurlversion_addedr   r   Preprocr	   
Whitespacer
   r   Functionr   Docr   r   FloatBinOctHexr   DateColorIntegerr   r   ConstantEscaper   tokens     S/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pygments/lexers/ul4.pyr   r      s~         L29$EDgG	I
2CM -$/7'/; ;	 A$/7$-9 9 $ &	 #
 %
	 & A$/7$-9 9 _$/7CC	 %$/7CC ,$/7CC	 u5M_P
h #GW5('6:w7O
 !'73&8w7O
  W5%vz6:vz"6:
 W_f-FJ'FJ'&)$&)$'6$fl3.FJ'VZ(!6:.I7<X//!7=1V^$cemnUHQVWWWY`aU,U;;;W=MN&-T_%I%
P W_f-UOX]^^^`ghTN
 W_f-U-e<<<goNT_%
 #FM2!6=1!6=1!6=1	
 VV$GO$$ 6N	
 VV$GO$$ 6N	
 66"GO$$ 6N	
 66"GO$$ 6N	
CG GFFFr^   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)
    Lexer for UL4 embedded in HTML.
    zHTML+UL4zhtml+ul4z	*.htmlul4r    c                 R     t                      j        t          t          fi | d S N)super__init__r   r   selfoptions	__class__s     r_   re   zHTMLUL4Lexer.__init__   s*    H8888888r^   rB   rC   rD   rE   rJ   rK   rL   rM   rN   re   __classcell__ri   s   @r_   r   r      sa          DlGI
2CM9 9 9 9 9 9 9 9 9r^   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(
    Lexer for UL4 embedded in XML.
    zXML+UL4zxml+ul4z*.xmlul4r   ra   c                 R     t                      j        t          t          fi | d S rc   )rd   re   r   r   rf   s     r_   re   zXMLUL4Lexer.__init__  *    877w77777r^   rj   rl   s   @r_   r   r      a          DkGI
2CM8 8 8 8 8 8 8 8 8r^   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(
    Lexer for UL4 embedded in CSS.
    zCSS+UL4zcss+ul4z*.cssul4r   ra   c                 R     t                      j        t          t          fi | d S rc   )rd   re   r   r   rf   s     r_   re   zCSSUL4Lexer.__init__  ro   r^   rj   rl   s   @r_   r   r     rp   r^   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/
    Lexer for UL4 embedded in Javascript.
    zJavascript+UL4zjs+ul4z*.jsul4r   ra   c                 R     t                      j        t          t          fi | d S rc   )rd   re   r   r   rf   s     r_   re   zJavascriptUL4Lexer.__init__%  s*    (>>g>>>>>r^   rj   rl   s   @r_   r   r     sa          DjGI
2CM? ? ? ? ? ? ? ? ?r^   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+
    Lexer for UL4 embedded in Python.
    z
Python+UL4zpy+ul4z*.pyul4r   ra   c                 R     t                      j        t          t          fi | d S rc   )rd   re   r   r   rf   s     r_   re   zPythonUL4Lexer.__init__4  s*    h::':::::r^   rj   rl   s   @r_   r   r   )  sa          DjGI
2CM; ; ; ; ; ; ; ; ;r^   r   ) rE   rF   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   r]   r^   r_   <module>r|      s    
			 P P P P P P P P P P P P P P                      N N N N N N N N N N N N . . . . . .3 3 3T T T T Tz T T Tl9 9 9 9 9? 9 9 98 8 8 8 8/ 8 8 88 8 8 8 8/ 8 8 8? ? ? ? ? ? ? ?; ; ; ; ;_ ; ; ; ; ;r^   