B
    `?N                 @   s"  d Z ddlZddlmZmZmZmZmZmZ ddl	m
Z
mZmZmZmZmZmZ ddlmZmZ ddlmZ ddlmZ ddlmZmZmZ dd	lmZ d
ddddddgZG dd
 d
eZG dd deZ G dd deZ!G dd de!Z"G dd deZ#G dd deZ$G dd deZ%e%Z&dS )z
    pygments.lexers.html
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for HTML, XML and related markup.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)
RegexLexerExtendedRegexLexerincludebygroupsdefaultusing)TextCommentOperatorKeywordNameStringPunctuation)looks_like_xmlhtml_doctype_matches)JavascriptLexer)
ScalaLexer)CssLexer_indentation_starts_block)	RubyLexer	HtmlLexerDtdLexerXmlLexer	XsltLexer	HamlLexer
ScamlLexerPugLexerc               @   s  e Zd ZdZdZdgZddddgZdd	gZej	ej
B Zd
efdejfdejfdedfdejfdejfdeeeejedfdeeeejedfdeeeejdfdeeeeeejeefg
defdedfdefgdefdeejeedfdejfd eeeedfgd!eeeeeejeedfd"eefd#eedfd$eedfgd%eeeeeejeedfd&eefd#eedfd$eedfgd'edfd(edfd)edfgd*Zd+d, Zd-S ).r   zo
    For HTML 4 and XHTML 1 markup. Nested JavaScript and CSS is highlighted
    by the appropriate lexer.
    ZHTMLhtmlz*.htmlz*.htmz*.xhtmlz*.xsltz	text/htmlzapplication/xhtml+xmlz[^<&]+z&\S*?;z\<\!\[CDATA\[.*?\]\]\>z<!--commentz	<\?.*?\?>z<![^>]*>z(<)(\s*)(script)(\s*))zscript-contenttagz(<)(\s*)(style)(\s*))zstyle-contentr    z(<)(\s*)([\w:.-]+)r    z"(<)(\s*)(/)(\s*)([\w:.-]+)(\s*)(>)z[^-]+z-->z#pop-z\s+z([\w:-]+\s*)(=)(\s*)attrz[\w:-]+z(/?)(\s*)(>)z (<)(\s*)(/)(\s*)(script)(\s*)(>)z.+?(?=<\s*/\s*script\s*>)z.+?\nz.+z(<)(\s*)(/)(\s*)(style)(\s*)(>)z.+?(?=<\s*/\s*style\s*>)z".*?"z'.*?'z[^\s>]+)rootr   r    zscript-contentzstyle-contentr"   c             C   s   t | rdS d S )Ng      ?)r   )text r%   \/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/pygments/lexers/html.pyanalyse_texti   s    zHtmlLexer.analyse_textN)__name__
__module____qualname____doc__namealiases	filenames	mimetypesre
IGNORECASEDOTALLflagsr   r   Entityr	   Preprocr   r   Tag	Attributer
   r   r   r   r   tokensr'   r%   r%   r%   r&   r      s^   

c               @   s  e Zd ZdZejejB ZdZdgZ	dgZ
dgZeddeeeejdfd	eeeejd
fdeeeejdfdeeeejdfdeeejeefdeeeejfdejfdefg	defdejfdedfdefdejfdejfgdefdedfdefgeddejfdejfd edfgedd!ejfd"ejfd#ejfdejfd edfgedd$ejfdejfd edfgedd%ejfdejfd edfgd&Zd'd( Zd)S )*r   zR
    A lexer for DTDs (Document Type Definitions).

    .. versionadded:: 1.5
    ZDTDZdtdz*.dtdzapplication/xml-dtdcommonz(<!ELEMENT)(\s+)(\S+)elementz(<!ATTLIST)(\s+)(\S+)attlistz(<!ENTITY)(\s+)(\S+)entityz(<!NOTATION)(\s+)(\S+)notationz(<!\[)([^\[\s]+)(\s*)(\[)z(<!DOCTYPE)(\s+)([^>\s]+)zPUBLIC|SYSTEMz[\[\]>]z\s+z(%|&)[^;]*;z<!--r   z	[(|)*,?+]z"[^"]*"z
\'[^\']*\'z[^-]+z-->z#popr!   zEMPTY|ANY|#PCDATAz[^>\s|()?+*,]+>z?CDATA|IDREFS|IDREF|ID|NMTOKENS|NMTOKEN|ENTITIES|ENTITY|NOTATIONz#REQUIRED|#IMPLIED|#FIXEDzxml:space|xml:langzSYSTEM|PUBLIC|NDATAzSYSTEM|PUBLIC)r#   r9   r   r:   r;   r<   r=   c             C   s(   t | s$d| ks d| ks d| kr$dS d S )Nz	<!ELEMENTz	<!ATTLISTz<!ENTITYg?)r   )r$   r%   r%   r&   r'      s    zDtdLexer.analyse_textN)r(   r)   r*   r+   r0   	MULTILINEr2   r3   r,   r-   r.   r/   r   r   r   r   r   r6   r4   ZConstantr	   r
   r   DoubleSingleZReservedr7   r8   r'   r%   r%   r%   r&   r   n   sd   



c            	   @   s   e Zd ZdZejejB ejB ZdZ	dgZ
dddddd	d
gZdddddgZdefdejfdejfdedfdejfdejfdejdfdejfgdefdedfdefgdefdejd fd!ejdfgdefd"edfd#edfd$edfgd%Zd&d' Zd(S ))r   z=
    Generic lexer for XML (eXtensible Markup Language).
    XMLxmlz*.xmlz*.xslz*.rssz*.xsltz*.xsdz*.wsdlz*.wsfztext/xmlzapplication/xmlzimage/svg+xmlzapplication/rss+xmlzapplication/atom+xmlz[^<&]+z&\S*?;z\<\!\[CDATA\[.*?\]\]\>z<!--r   z	<\?.*?\?>z<![^>]*>z<\s*[\w:.-]+r    z<\s*/\s*[\w:.-]+\s*>z[^-]+z-->z#popr!   z\s+z[\w.:-]+\s*=r"   z/?\s*>z".*?"z'.*?'z[^\s>]+)r#   r   r    r"   c             C   s   t | rdS d S )Ng?)r   )r$   r%   r%   r&   r'      s    zXmlLexer.analyse_textN)r(   r)   r*   r+   r0   r?   r2   UNICODEr3   r,   r-   r.   r/   r   r   r4   r	   r5   r6   r7   r   r8   r'   r%   r%   r%   r&   r      s6   



c            #   @   s   e Zd ZdZdZdgZdddgZddgZd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+h#Zd,d- Z	d.d/ Z
d0S )1r   z7
    A lexer for XSLT.

    .. versionadded:: 0.10
    ZXSLTZxsltz*.xslz*.xsltz*.xplzapplication/xsl+xmlzapplication/xslt+xmlzapply-importszapply-templates	attributezattribute-setzcall-templatechooser   copyzcopy-ofzdecimal-formatr:   fallbackzfor-eachifimportr   keymessageznamespace-aliasnumberZ	otherwiseoutputparamzpreserve-spacezprocessing-instructionsortzstrip-spaceZ
stylesheettemplater$   Z	transformzvalue-ofvariablewhenz
with-paramc             c   sd   x^t | |D ]N\}}}td|}|tjkrP|rP|d| jkrP|t|fV  q|||fV  qW d S )Nz</?xsl:([^>]*)/?>?   )	r   get_tokens_unprocessedr0   matchr   r6   groupEXTRA_KEYWORDSr   )selfr$   indextokenvaluemr%   r%   r&   rU     s
    z XsltLexer.get_tokens_unprocessedc             C   s   t | rd| krdS d S )Nz<xslg?)r   )r$   r%   r%   r&   r'     s    zXsltLexer.analyse_textN)r(   r)   r*   r+   r,   r-   r.   r/   rX   rU   r'   r%   r%   r%   r&   r      s   



	c               @   sh  e Zd ZdZdZdgZdgZdgZej	Z
dZde d Zd	efd
efgdejdfdejdfgdedfde d eeeedfedgeddejdfde d ejdfde d e d eeejedfde d eeddfde d eejddfde d eeeedfde d eejd dfed!g	edd"e d# eefd$e d% eefd&ed'fd(ed)fd*efed!gd+efd,e d- eej eeej fd.edfgd/efd0ej!d1fd2ej!fd3edfgd4efd5ej"dfd6ej"j#dfd7ej"j$dfd8edfd9edfged: efd.edfged: ejfd.edfgd+ejfd,e d- eej eeej fd.edfgd;Z%d<S )=r   z5
    For Haml markup.

    .. versionadded:: 1.3
    ZHamlZhamlz*.hamlztext/x-hamlz(?: \|\n(?=.* \|)|.)z
(?:,\s*\n|)z[ \t]*\nz[ \t]*z	\.[\w:-]+r    z	\#[\w:-]+z[&!]?==plainz([&!]?[=~])(z*\n)r#   cssz%[\w:-]+z!!!z*\nz#popz(/)(\[z*?\])(/zhtml-comment-blockz-#zhaml-comment-blockz(-)(:zfilter-blockzeval-or-plainz\{(,\n|z)*?\}z\[z*?\]z\(zhtml-attributesz	/[ \t]*\nz#pop:2z[<>]{1,2}(?=[ \t=])z([^#\n]|#[^{\n]|(\\\\)*\\#\{)+z(#\{)(z*?)(\})z\nz\s+z[\w:-]+[ \t]*=zhtml-attribute-valuez[\w:-]+z\)z[ \t]+z\w+z@\w+z\$\w+z'(\\\\|\\[^\\]|[^'\\\n])*'z"(\\\\|\\[^\\]|[^"\\\n])*"+)r#   r`   zeval-or-plaincontentr    r_   zhtml-attributeszhtml-attribute-valuezhtml-comment-blockzhaml-comment-blockzfilter-blockN)&r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r3   _dotZ
_comma_dotr   r   r   ClassFunctionr   r   r   r   r   r   r6   	Namespacer	   Specialr   r5   	Decoratorr   Interpolr7   VariableInstanceGlobalr8   r%   r%   r%   r&   r     s|   













c               @   sx  e Zd ZdZdZdgZdgZdgZej	Z
dZdefdefgd	ejd
fdejd
fgdedfde d eeeedfedgeddejd
fde d ejdfde d e d eeejedfde d eeddfde d eejddfde d eeeeedfde d eeeedfde d eejddfed g
edd!e d" eefd#e d$ eefd%ed&fd'ed(fd)efed gd*efd+e d, eej eeej fd-edfgd.efd/ej!d0fd1ej!fd2edfgd3efd4ej"dfd5ej"j#dfd6ej"j$dfd7edfd8edfged9 efd-edfged9 ejfd-edfgd*ejfd+e d, eej eeej fd-edfgd:Z%d;S )<r   zt
    For `Scaml markup <http://scalate.fusesource.org/>`_.  Scaml is Haml for Scala.

    .. versionadded:: 1.4
    ZScamlZscamlz*.scamlztext/x-scaml.z[ \t]*\nz[ \t]*z	\.[\w:-]+r    z	\#[\w:-]+z[&!]?==r_   z([&!]?[=~])(z*\n)r#   r`   z%[\w:-]+z!!!z*\nz#popz(/)(\[z*?\])(ra   zhtml-comment-blockz-#zscaml-comment-blockz(-@\s*)(import)?(z(-)(rb   zfilter-blockzeval-or-plainz\{(,\n|z)*?\}z\[z*?\]z\(zhtml-attributesz	/[ \t]*\nz#pop:2z[<>]{1,2}(?=[ \t=])z([^#\n]|#[^{\n]|(\\\\)*\\#\{)+z(#\{)(z*?)(\})z\nz\s+z[\w:-]+[ \t]*=zhtml-attribute-valuez[\w:-]+z\)z[ \t]+z\w+z@\w+z\$\w+z'(\\\\|\\[^\\]|[^'\\\n])*'z"(\\\\|\\[^\\]|[^"\\\n])*"rc   )r#   r`   zeval-or-plainrd   r    r_   zhtml-attributeszhtml-attribute-valuezhtml-comment-blockzscaml-comment-blockzfilter-blockN)&r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r3   re   r   r   r   rf   rg   r   r   r   r   r   r   r6   rh   r	   ri   r   r5   r   rj   r   rk   r7   rl   rm   rn   r8   r%   r%   r%   r&   r     s   














c               @   s  e Zd ZdZdZddgZddgZddgZej	Z
d	Zd
efdefgdejdfdejdfgdedfde d eeeedfedgedde d ejdfde d e d eeejedfde d eeddfde d eejddfde d eeeeedfde d eeeedfd e d eejd!dfd"ejdfd#ed$fg
edd%e d& eefd'e d( eefd)ed*fd+ed,fd-efed$gd.efd/e d0 eej eeej fd1edfgd2efd3ej!d4fd"ej!fd5edfgd6efd7ej"dfd8ej"j#dfd9ej"j$dfd:edfd;edfged< efd1edfged< ejfd1edfgd.ejfd/e d0 eej eeej fd1edfgd=Z%d>S )?r   z
    For Pug markup.
    Pug is a variant of Scaml, see:
    http://scalate.fusesource.org/documentation/scaml-reference.html

    .. versionadded:: 1.4
    ZPugZpugZjadez*.pugz*.jadez
text/x-pugztext/x-jadero   z[ \t]*\nz[ \t]*z	\.[\w:-]+r    z	\#[\w:-]+z[&!]?==r_   z([&!]?[=~])(z*\n)r#   r`   z!!!z*\nz#popz(/)(\[z*?\])(ra   zhtml-comment-blockz-#zscaml-comment-blockz(-@\s*)(import)?(z(-)(rb   zfilter-blockz[\w:-]+z\|zeval-or-plainz\{(,\n|z)*?\}z\[z*?\]z\(zhtml-attributesz	/[ \t]*\nz#pop:2z[<>]{1,2}(?=[ \t=])z([^#\n]|#[^{\n]|(\\\\)*\\#\{)+z(#\{)(z*?)(\})z\nz\s+z[\w:-]+[ \t]*=zhtml-attribute-valuez\)z[ \t]+z\w+z@\w+z\$\w+z'(\\\\|\\[^\\]|[^'\\\n])*'z"(\\\\|\\[^\\]|[^"\\\n])*"rc   )r#   r`   zeval-or-plainrd   r    r_   zhtml-attributeszhtml-attribute-valuezhtml-comment-blockzscaml-comment-blockzfilter-blockN)&r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r3   re   r   r   r   rf   rg   r   r   r   r   r   r   rh   r	   ri   r   r5   r   rj   r6   r   rk   r7   rl   rm   rn   r8   r%   r%   r%   r&   r     s~   















)'r+   r0   Zpygments.lexerr   r   r   r   r   r   Zpygments.tokenr   r	   r
   r   r   r   r   Zpygments.utilr   r   Zpygments.lexers.javascriptr   Zpygments.lexers.jvmr   Zpygments.lexers.cssr   r   r   Zpygments.lexers.rubyr   __all__r   r   r   r   r   r   r   Z	JadeLexerr%   r%   r%   r&   <module>	   s$    $
RX0%opk