Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/pygments/lexers/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/pygments/lexers/__pycache__/markup.cpython-37.pyc

B

ɽ�\%Q�@sndZddlZddlmZmZddlmZddlmZddl	m
Z
mZmZm
Z
mZmZmZmZmZddlmZmZmZmZmZmZmZmZmZmZddlmZm Z d	d
ddd
ddddddgZ!Gdd	�d	e
�Z"Gdd
�d
e
�Z#Gdd�de
�Z$Gdd�de
�Z%Gdd
�d
e
�Z&Gdd�de
�Z'Gdd�de'�Z(Gdd�de�Z)Gdd�de�Z*Gdd�de�Z+Gdd�de
�Z,dS)z�
    pygments.lexers.markup
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for non-HTML markup languages.

    :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�	HtmlLexer�XmlLexer)�JavascriptLexer)�CssLexer)	�
RegexLexer�DelegatingLexer�include�bygroups�using�this�
do_insertions�default�words)
�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Generic�Other)�get_bool_opt�
ClassNotFound�BBCodeLexer�
MoinWikiLexer�RstLexer�TexLexer�
GroffLexer�MozPreprocHashLexer�MozPreprocPercentLexer�MozPreprocXulLexer�MozPreprocJavascriptLexer�MozPreprocCssLexer�
MarkdownLexerc@sheZdZdZdZdgZdgZdefdedfdefgd	efd
e	e
jee
�fde	ee
�fded
fgd�ZdS)rzR
    A lexer that highlights BBCode(-like) syntax.

    .. versionadded:: 0.6
    ZBBCodeZbbcodez
text/x-bbcodez[^[]+z\[/?\w+�tagz\[z\s+z(\w+)(=)("?[^\s"\]]+"?)z(=)("?[^\s"\]]+"?)z\]z#pop)�rootr&N)�__name__�
__module__�__qualname__�__doc__�name�aliases�	mimetypesrrr	r�	Attributerr�tokens�r1r1�G/opt/alt/python37/lib/python3.7/site-packages/pygments/lexers/markup.pyrs
c@s�eZdZdZdZddgZgZdgZej	ej
BZdefde
ee�fde
ejee�eje�fd	e
ejej�d
fdefde
eeje�fd
e
eeje�fdefde
eee�fdefdefdefdefg
dejdfdedfdejfdejfgd�ZdS)rzI
    For MoinMoin (and Trac) Wiki markup.

    .. versionadded:: 0.7
    zMoinMoin/Trac Wiki markupz	trac-wikiZmoinztext/x-trac-wikiz^#.*$z(!)(\S+)z^(=+)([^=]+)(=+)(\s*#.+)?$z(\{\{\{)(\n#!.+)?�	codeblockz(\'\'\'?|\|\||`|__|~~|\^|,,|::)z^( +)([.*-])( )z^( +)([a-z]{1,5}\.)( )z\[\[\w+.*?\]\]z(\[[^\s\]]+)(\s+[^\]]+?)?(\])z^----+$z[^\n\'\[{!_~^,|]+z\n�.z\}\}\}z#popz\{\{\{z#pushz[^{}]+)r'r3N)r(r)r*r+r,r-�	filenamesr.�re�	MULTILINE�
IGNORECASE�flagsrr	rrr�Headingr
rrr�BuiltinZ	Namespace�Preprocr0r1r1r1r2r?s2
c@s�eZdZdZdZdddgZddgZdd	gZej	Z
d
d�ZdZd
Z
de�e
�e�e�fZdeejeejeeje�fdeejeeje�fdeeeeedd��fdeeeeedd��fdeeeeedd��fdeeeeedd��fdeeeeedd��fdeeeeedd��fdefdeeeejeeeedd��fdeeeejeedd��fdeeeejeedd��fdeeeejeejeeeedd��fdejfdeeeje�fd eeejeej�fd!eeedd�eedd��fd"ee j!ee e ee �fe"d�gd#efd$e d%fd&ee e j#e �fd'e fd(eej$ej%�fd)eej%ej$�fd*ej&fd+ej'fd,e fd-ejfd.efd/efgd0e fd$ee d1fd2e fgd3�Z(d4d5�Z)d6d7�Z*d8S)9ra�
    For `reStructuredText <http://docutils.sf.net/rst.html>`_ markup.

    .. versionadded:: 0.7

    Additional options accepted:

    `handlecodeblocks`
        Highlight the contents of ``.. sourcecode:: language``,
        ``.. code:: language`` and ``.. code-block:: language``
        directives with a lexer for the given language (default:
        ``True``).

        .. versionadded:: 0.8
    ZreStructuredTextZrst�restZrestructuredtextz*.rstz*.restz
text/x-rstztext/prs.fallenstein.rstc	cs�ddlm}|�d�t|�d�fV|�d�t|�d�fV|�d�tj|�d�fV|�d�t|�d�fV|�d�t|�d�fV|�d�t|�d�fV|�d	�t|�d	�fVd}|j	r�y||�d��
��}Wntk
r�YnX|�d
�}t|�}||�d�|�d�|�d
�}|dk�r@|�d
�t
|fVdSg}|�d�}d}xX|D]P}	t|	�|k�r�|�t|�dt|	d|�fgf�||	|d�7}n||	7}�qXWx t||�|��D]}
|
V�q�WdS)Nr)�get_lexer_by_name���������	�
�T�)�pygments.lexersr>�startr�grouprr�Wordr�handlecodeblocks�stripr�lenr�
splitlines�appendr�get_tokens_unprocessed)�self�matchr>�lexerZ	indentionZindention_size�codeZinsZ	codelines�line�itemr1r1r2�_handle_sourcecode�s<
"


"zRstLexer._handle_sourcecodeu'")]}>’”»!?u‐‑‒–— z((?=$)|(?=[-/:.,; \n\x00%s%s]))zH^(=+|-+|`+|:+|\.+|\'+|"+|~+|\^+|_+|\*+|\++|#+)([ \t]*\n)(.+)(\n)(\1)(\n)zc^(\S.*)(\n)(={3,}|-{3,}|`{3,}|:{3,}|\.{3,}|\'{3,}|"{3,}|~{3,}|\^{3,}|_{3,}|\*{3,}|\+{3,}|#{3,})(\n)z!^(\s*)([-*+])( .+\n(?:\1  .+\n)*)�inline)�statez1^(\s*)([0-9#ivxlcmIVXLCM]+\.)( .+\n(?:\1  .+\n)*)z4^(\s*)(\(?[0-9#ivxlcmIVXLCM]+\))( .+\n(?:\1  .+\n)*)z$^(\s*)([A-Z]+\.)( .+\n(?:\1  .+\n)+)z*^(\s*)(\(?[A-Za-z]+\))( .+\n(?:\1  .+\n)+)z^(\s*)(\|)( .+\n(?:\|  .+\n)*)zl^( *\.\.)(\s*)((?:source)?code(?:-block)?)(::)([ \t]*)([^\n]+)(\n[ \t]*\n)([ \t]+)(.*)(\n)((?:(?:\8.*|)\n)+)z,^( *\.\.)(\s*)([\w:-]+?)(::)(?:([ \t]*)(.*))z'^( *\.\.)(\s*)(_(?:[^:\\]|\\.)+:)(.*?)$z^( *\.\.)(\s*)(\[.+\])(.*?)$z9^( *\.\.)(\s*)(\|.+\|)(\s*)([\w:-]+?)(::)(?:([ \t]*)(.*))z^ *\.\..*(\n( +.*\n|\n)+)?z^( *)(:[a-zA-Z-]+:)(\s*)$z^( *)(:.*?:)([ \t]+)(.*?)$z!^(\S.*(?<!::)\n)((?:(?: +.*)\n)+)z2(::)(\n[ \t]*\n)([ \t]+)(.*)(\n)((?:(?:\3.*|)\n)+)z\\.z``�literalz(`.+?)(<.+?>)(`__?)z`.+?`__?z(`.+?`)(:[a-zA-Z0-9:-]+?:)?z(:[a-zA-Z0-9:-]+?:)(`.+?`)z\*\*.+?\*\*z\*.+?\*z\[.*?\]_z<.+?>z
[^\\\n\[*`:]+r4z[^`]+z#pop�`)r'r\r^cKs t|dd�|_tj|f|�dS)NrOT)rrOr�__init__)rU�optionsr1r1r2r`szRstLexer.__init__cCs�|dd�dkr$|dd�dkr$dS|�d�}|�d|d�}|dkr�|dd|kr�||dd	kr�||d||dkr�d
SdS)Nr@z..rAr4g333333�?�
r?���z-=g�?)�find)�text�p1�p2r1r1r2�analyse_text	s 
zRstLexer.analyse_textN)+r(r)r*r+r,r-r5r.r6r7r9r[ZclosersZunicode_delimiters�escapeZend_string_suffixr	rr:rrr
rrrrNr�Tagrr<�ClassZFunctionr�EscaperZInterpol�Variabler/�Strong�Emphr0r`rhr1r1r1r2rls�
*c
@seZdZdZdZddgZdddgZdd	gZd
efde	j
fde	j
fgd
ejdfdedfdejdfdedfde
dfde
fed�defgde	jfed�defdefde	j
fgdedfdedfed�gdedfdedfde	j
fed�gde	jfd e
fed�gd!�Zd"d#�Zd$S)%rz<
    Lexer for the TeX and LaTeX typesetting languages.
    ZTeXZtexZlatexz*.texz*.auxz*.tocz
text/x-texztext/x-latexz%.*?\nz[{}]z[&_^]z\\\[�displaymathz\\\(�
inlinemathz\$\$z\$z\\([a-zA-Z]+|.)�commandz\\$�generalz
[^\\$%&_^{}]+z[0-9]+z[-=!+*/()\[\]]z[^=!+*/()\[\]\\$%&_^{}0-9-]+z\\\)z#pop�mathz\\\]z\[.*?\]z\*)rsr'rtrqrprrcCs*x$dD]}|dt|��|krdSqWdS)N)z\documentclassz\inputz\documentstylez\relaxT)rQ)rerLr1r1r2rhHs
zTexLexer.analyse_textN)r(r)r*r+r,r-r5r.rrr;r�Backtickrrrrmrrr/r
r0rhr1r1r1r2rs@




c
@s�eZdZdZdZdddgZddgZdd	gZd
ee	e
�dfdedfd
e	dfed�ge
d�d
e	fde	dfgdefdejfdejfdejfdejfde	dfgde	dfe
d�dejfdefdefde	fgd�Zdd�ZdS) rz�
    Lexer for the (g)roff typesetting language, supporting groff
    extensions. Mainly useful for highlighting manpage sources.

    .. versionadded:: 0.6
    ZGroffZgroffZnroffZmanz*.[1234567]z*.manzapplication/x-troffz
text/troffz	(\.)(\w+)�requestz\.z[^\\\n]+�textline�escapesz\nz#popz	\\"[^\n]*z\\[fn]\wz\\\(.{2}z	\\.\[.*\]z\\.z\\\nz	"[^\n"]+"z\d+z\S+z\s+)r'rwrxrvcCs`|dd�dkrdS|dd�dkr(dS|dd�dkr<dS|dd���r\|d��r\d	SdS)
Nr?r4FrAz.\"TrBz.TH g�������?)�isalnum�isspace)rer1r1r2rh|szGroffLexer.analyse_textN)r(r)r*r+r,r-r5r.r	rrrr
rrrrl�Doublerr0rhr1r1r1r2rOs2


c
@s�eZdZdZdZegZgZgZdej	dfde
fgdeej	e�dfe
d�ej	d	fge
d
�efdeee�fdefd
ejfdejfdejfdefded	fdefdefg
d�ZdS)r z�
    Lexer for Mozilla Preprocessor files (with '#' as the marker).

    Other data is left untouched.

    .. versionadded:: 2.0
    Zmozhashpreprocz^#)�expr�	exprstartz.+z
(literal)(.*)z#pop:2)ZdefineZundef�ifZifdefZifndef�else�elifZelifdefZelifndefZendif�expand�filterZunfilterrZincludesubst�errorz#pop)�!z!=z==z&&z||z
(defined)(\()z\)z[0-9]+z__\w+?__z@\w+?@z\w+z\nz\s+z\S)r'r}r|N)r(r)r*r+r,r-r5r.rr<rr	rrrrrrZDecimalrrmrkr0r1r1r1r2r �s*


c@s:eZdZdZdZegZgZgZddej	dfde
fgiZdS)r!z�
    Lexer for Mozilla Preprocessor files (with '%' as the marker).

    Other data is left untouched.

    .. versionadded:: 2.0
    Zmozpercentpreprocr'z^%)r|r}z.+N)r(r)r*r+r,r-r5r.rr<rr0r1r1r1r2r!�s
cs4eZdZdZdZdgZdgZgZ�fdd�Z�Z	S)r"z�
    Subclass of the `MozPreprocHashLexer` that highlights unlexed data with the
    `XmlLexer`.

    .. versionadded:: 2.0
    zXUL+mozpreproczxul+mozpreprocz*.xul.incstt|�jttf|�dS)N)�superr"r`rr )rUra)�	__class__r1r2r`�s
zMozPreprocXulLexer.__init__)
r(r)r*r+r,r-r5r.r`�
__classcell__r1r1)r�r2r"�scs4eZdZdZdZdgZdgZgZ�fdd�Z�Z	S)r#z�
    Subclass of the `MozPreprocHashLexer` that highlights unlexed data with the
    `JavascriptLexer`.

    .. versionadded:: 2.0
    zJavascript+mozpreproczjavascript+mozpreprocz*.js.incstt|�jttf|�dS)N)r�r#r`rr )rUra)r�r1r2r`�s
z"MozPreprocJavascriptLexer.__init__)
r(r)r*r+r,r-r5r.r`r�r1r1)r�r2r#�scs4eZdZdZdZdgZdgZgZ�fdd�Z�Z	S)r$z�
    Subclass of the `MozPreprocHashLexer` that highlights unlexed data with the
    `CssLexer`.

    .. versionadded:: 2.0
    zCSS+mozpreproczcss+mozpreprocz*.css.incstt|�jttf|�dS)N)r�r$r`rr!)rUra)r�r1r2r`�s
zMozPreprocCssLexer.__init__)
r(r)r*r+r,r-r5r.r`r�r1r1)r�r2r$�sc@sheZdZdZdZdgZdgZdgZej	Z
dd�Zdee
je�fd	ee
je�fd
eeeeeedd��fd
eeeeeedd��fdeeeeedd��fdeee
j�fdeeee�fdefed�g	defdeee
je�fdeee
jde�fdeee
je�fdejfdejfdeeejeeeje�fdeeejeeeje�fdeeejeej�fdefdefgd�Zdd �Z dS)!r%zt
    For `Markdown <https://help.github.com/categories/writing-on-github/>`_ markup.

    .. versionadded:: 2.2
    ZmarkdownZmdz*.mdztext/x-markdownccs�ddlm}|�d�t|�d�fV|�d�t|�d�fV|�d�t|�d�fVd}|jr�y||�d����}Wntk
r�YnX|�d�}|dkr�|�d�t|fVn xt	g|�
|��D]
}|Vq�W|�d�t|�d�fVdS)	zV
        match args: 1:backticks, 2:lang_name, 3:newline, 4:code, 5:backticks
        r)r>r?r@rANrBrC)rKr>rLrrMrrOrPrrrT)rUrVr>rWrXrZr1r1r2�_handle_codeblocks 

zMarkdownLexer._handle_codeblockz^(#)([^#].+\n)z^(#{2,6})(.+\n)z^(\s*)([*-] )(\[[ xX]\])( .+\n)r\)r]z^(\s*)([*-])(\s)(.+\n)z^(\s*)([0-9]+\.)( .+\n)z^(\s*>\s)(.+\n)z^(```\n)([\w\W]*?)(^```$)z ^(```)(\w+)(\n)([\w\W]*?)(^```$)z\\.z(\s)([*_][^*_]+[*_])(\W|\n)z(\s)((\*\*|__).*\3)((?=\W|\n))Nz(\s)(~~[^~]+~~)((?=\W|\n))z`[^`]+`z[@#][\w/:]+z (!?\[)([^]]+)(\])(\()([^)]+)(\))z(\[)([^]]+)(\])(\[)([^]]*)(\])z^(\s*\[)([^]]*)(\]:\s*)(.+)z[^\\\s]+r4)r'r\cKs t|dd�|_tj|f|�dS)NrOT)rrOrr`)rUrar1r1r2r`UszMarkdownLexer.__init__)!r(r)r*r+r,r-r5r.r6r7r9r�r	rr:rZ
Subheadingrr
rrorrrnZDeletedrurZEntityrjr/ZLabelr0r`r1r1r1r2r%�s> )-r+r6Zpygments.lexers.htmlrrZpygments.lexers.javascriptrZpygments.lexers.cssrZpygments.lexerrrrr	r
rrr
rZpygments.tokenrrrrrrrrrrZ
pygments.utilrr�__all__rrrrrr r!r"r#r$r%r1r1r1r2�<module>
s.,0
!-*:8)