B
    (dM                 @   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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-2023 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
Whitespace)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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j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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.
    HTMLzhttps://html.spec.whatwg.org/htmlz*.htmlz*.htmz*.xhtmlz*.xsltz	text/htmlzapplication/xhtml+xmlz[^<&]+z&\S*?;z\<\!\[CDATA\[.*?\]\]\>z
<!--.*?-->z	<\?.*?\?>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\s+z([\w:-]+\s*)(=)(\s*)attrz[\w:-]+z(/?)(\s*)(>)z#popz (<)(\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!   zscript-contentzstyle-contentr"   c             C   s   t | rdS d S )Ng      ?)r   )text r%   a/work/yifan.wang/ringdown/master-ringdown-env/lib/python3.7/site-packages/pygments/lexers/html.pyanalyse_texte   s    zHtmlLexer.analyse_textN)__name__
__module____qualname____doc__nameurlaliases	filenames	mimetypesre
IGNORECASEDOTALLflagsr   r   Entityr	   Preproc	Multiliner   r   Tag	Attributer
   r   r   r   r   tokensr'   r%   r%   r%   r&   r      sZ   

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
    DTD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<!--commentz	[(|)*,?+]z"[^"]*"z
\'[^\']*\'z[^-]+z-->z#pop-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#   r=   rB   r>   r?   r@   rA   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+   r1   	MULTILINEr3   r4   r,   r.   r/   r0   r   r   r   r   r   r8   r5   Constantr	   r
   r   DoubleSingleReservedr9   r:   r'   r%   r%   r%   r&   r   j   sd   



c            
   @   s   e Zd ZdZej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fdejfdejfdejfdejfdejfdejdfdej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[^<&\s]+z[^<&\S]+z&\S*?;z\<\!\[CDATA\[.*?\]\]\>z
<!--.*?-->z	<\?.*?\?>z<![^>]*>z<\s*[\w:.-]+r!   z<\s*/\s*[\w:.-]+\s*>z\s+z[\w.:-]+\s*=r"   z/?\s*>z#popz".*?"z'.*?'z[^\s>]+)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+   r1   rE   r3   r4   r,   r.   r/   r0   r   r   r   r5   r	   r6   r7   r8   r9   r   r:   r'   r%   r%   r%   r&   r      s2   



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
    XSLTxsltz*.xslz*.xsltz*.xplzapplication/xsl+xmlzapplication/xslt+xmlzapply-importszapply-templates	attributezattribute-setzcall-templatechooserB   copyzcopy-ofzdecimal-formatr>   fallbackzfor-eachifimportr   keymessageznamespace-aliasnumberZ	otherwiseoutputparamzpreserve-spacezprocessing-instructionsortzstrip-space
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_unprocessedr1   matchr   r8   groupEXTRA_KEYWORDSr   )selfr$   indextokenvaluemr%   r%   r&   r_     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/   r0   rb   r_   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
    Haml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#   rl   zeval-or-plaincontentr!   rk   zhtml-attributeszhtml-attribute-valuezhtml-comment-blockzhaml-comment-blockzfilter-blockN)&r(   r)   r*   r+   r,   r.   r/   r0   r1   r2   r4   _dotZ
_comma_dotr   r   r   ClassFunctionr   r   r   r   r   r   r8   	Namespacer	   Specialr   r6   	Decoratorr   Interpolr9   VariableInstanceGlobalr:   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
    Scamlscamlz*.scamlztext/x-scaml.z[ \t]*\nz[ \t]*z	\.[\w:-]+r!   z	\#[\w:-]+z[&!]?==rk   z([&!]?[=~])(z*\n)r#   rl   z%[\w:-]+z!!!z*\nz#popz(/)(\[z*?\])(rm   zhtml-comment-blockz-#zscaml-comment-blockz(-@\s*)(import)?(z(-)(rn   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])*"ro   )r#   rl   zeval-or-plainrp   r!   rk   zhtml-attributeszhtml-attribute-valuezhtml-comment-blockzscaml-comment-blockzfilter-blockN)&r(   r)   r*   r+   r,   r.   r/   r0   r1   r2   r4   rq   r   r   r   rr   rs   r   r   r   r   r   r   r8   rt   r	   ru   r   r6   r   rv   r   rw   r9   rx   ry   rz   r:   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
    Pugpugjadez*.pugz*.jadez
text/x-pugztext/x-jader}   z[ \t]*\nz[ \t]*z	\.[\w:-]+r!   z	\#[\w:-]+z[&!]?==rk   z([&!]?[=~])(z*\n)r#   rl   z!!!z*\nz#popz(/)(\[z*?\])(rm   zhtml-comment-blockz-#zscaml-comment-blockz(-@\s*)(import)?(z(-)(rn   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])*"ro   )r#   rl   zeval-or-plainrp   r!   rk   zhtml-attributeszhtml-attribute-valuezhtml-comment-blockzscaml-comment-blockzfilter-blockN)&r(   r)   r*   r+   r,   r.   r/   r0   r1   r2   r4   rq   r   r   r   rr   rs   r   r   r   r   r   r   rt   r	   ru   r   r6   r   rv   r8   r   rw   r9   rx   ry   rz   r:   r%   r%   r%   r&   r     s~   















)(r+   r1   Zpygments.lexerr   r   r   r   r   r   Zpygments.tokenr   r	   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$    (
NX,%opk