3

V'íc~-ã@s°dZddlmZmZmZmZmZmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZddlmZddlmZmZmZmZmZddgZdZd	ZGd
d„deƒZGdd„deƒZdS)
    pygments.lexers.julia
    ~~~~~~~~~~~~~~~~~~~~~

    Lexers for the Julia language.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é)ÚLexerÚ
RegexLexerÚbygroupsÚ
do_insertionsÚwordsÚinclude)
ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚGenericÚ
Whitespace)Úshebang_matches)ÚOPERATORS_LISTÚDOTTED_OPERATORS_LISTÚKEYWORD_LISTÚBUILTIN_LISTÚLITERAL_LISTÚ
JuliaLexerÚJuliaConsoleLexeru)(?:[a-zA-Z_¡-ô¿¿][a-zA-Z_0-9!¡-ô¿¿]*)uN[²³¹ʰʲʳʷʸˡˢˣᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁᵂᵃᵇᵈᵉᵍᵏᵐᵒᵖᵗᵘᵛᵝᵞᵟᵠᵡᵢᵣᵤᵥᵦᵧᵨᵩᵪᶜᶠᶥᶦᶫᶰᶸᶻᶿ′″‴‵‶‷⁗⁰ⁱ⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓₕₖₗₘₙₚₛₜⱼⱽ]*c,@sÆeZdZdZdZdZddgZdgZddgZd	e	fd
e	fde
jdfd
e
fdefde
de
deee	eeƒfde
dejfde
dee	ejƒfde
de
deeje	ee	ejƒfde
deee	ejƒfde
deeje	eƒfeee•edefedd„eDƒedefeddgƒefdejfded efd!eejeƒd"fd#eejeƒd$fd%eejejƒd&fd'eejejƒd(fde
d)eejeƒd*fde
d+eejeƒd,fde
d-eejejƒd.fde
d/eejejƒd0fde
d1eejeƒd2fd3e
deee	ejƒfd4ed2fd5e
deee	eeejƒfd6e
deee	eeejƒfd7e
ejfeedhe•d7ed9ejfeed:defee d:dejfee!d:dej"fe
efd;e#j$fd<e#j$fd=e#j$fd>e#j%fd?e#j&fd@e#j'fdAe#j(fed8gƒefg+dBe
jfde
jdCfdDe
jdEfdFe
jfgdGedCfdHedEfe
ejfe)dIƒgdJedEfdKefgdLedEfdMej*fdNefgdOe
ej+fdPeej+eƒdQfgdRedCfdSedEfe)dIƒgdTe
dUeeejƒdEfdVej*fe)dWƒdXej+fdYefd8efgdZe
dUeeejƒdEfdVej*fe)dWƒdYefd8efgd[eejejƒdEfdMejfd\ejfgd]eejejƒdEfd^ejfgd_e
dUeejejƒdEfd`ej*fe)dWƒdaejfd8ejfgdbe
dUeejejƒdEfdcej*fe)dWƒdaejfd8ejfgddœ
Z,dedf„Z-dgS)irz;
    For Julia source code.

    .. versionadded:: 1.6
    ZJuliazhttps://julialang.org/ÚjuliaZjlz*.jlztext/x-juliazapplication/x-juliaz\nz[^\S\n]+z#=Úblockcommentz#.*$z
[\[\](),;]ú(z
)(\s*)(:)(ú)z(?<![\]):<>\d.])(:z
(?<=::)(\s*)(z)\b(?![(\[])z)(\s*)([<>]:)(\s*)(z
([<>]:)(\s*)(z\b(z
)(\s*)([<>]:))ÚsuffixcCsg|]}d|‘qS)Ú.©)Ú.0Úor r ú9/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/julia.pyú
<listcomp>KszJuliaLexer.<listcomp>z...ú..zZ'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|\\u[a-fA-F0-9]{1,4}|\\U[a-fA-F0-9]{1,6}|[^\\\'\n])'z(?<=[.\w)\]])(\'z)+z
(raw)(""")Útqrawstringz(raw)(")Ú	rawstringz(r)(""")Útqregexz(r)(")Úregexz)?(""")Útqstringz)?(")Ústringz)?(```)Ú	tqcommandz)?(`)Úcommandz)(\{)Úcurlyz
(where)(\s+)(z(\{)z.(abstract|primitive)([ \t]+)(type\b)([\s()]+)(z0(mutable(?=[ \t]))?([ \t]+)?(struct\b)([\s()]+)(ú@r)Úprefixrz\bzJ(\d+((_\d+)+)?\.(?!\.)(\d+((_\d+)+)?)?|\.\d+((_\d+)+)?)([eEf][+-]?[0-9]+)?z\d+((_\d+)+)?[eEf][+-]?[0-9]+zQ0x[a-fA-F0-9]+((_[a-fA-F0-9]+)+)?(\.([a-fA-F0-9]+((_[a-fA-F0-9]+)+)?)?)?p[+-]?\d+z0b[01]+((_[01]+)+)?z0o[0-7]+((_[0-7]+)+)?z!0x[a-fA-F0-9]+((_[a-fA-F0-9]+)+)?z
\d+((_\d+)+)?z[^=#]z#pushz=#z#popz[=#]z\{z\}Úrootz"""z([^"]|"[^"][^"])+ú"z\\"z([^"\\]|\\[^"])+z\$z(\$)(\()zin-intpz\(z\)z(")(z|\d+)?z+\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)Úinterpz=%[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]z	[^"$%\\]+z(""")(z(")([imsxa]*)?z[^\\"]+z(""")([imsxa]*)?z[^"]+z(`)(z\\[`$]z[^\\`$]+z(```)(z\\\$)
r1rr.r&r'r3zin-intpr+r*r)r(r-r,cCs
t|dƒS)Nr)r)Útextr r r#Úanalyse_textószJuliaLexer.analyse_textN)r%r).Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	filenamesÚ	mimetypesrr	Z	MultilinerÚallowed_variablerrr
r
ZSymbolrÚTyperrrÚoperator_suffixesZCharZAffixÚRegexZBacktickrZ	DecoratorrrrZBuiltinrZFloatZBinÚOctZHexZIntegerrZEscapeZInterpolÚtokensr5r r r r#rsè

























c@s$eZdZdZdZddgZdd„ZdS)rzb
    For Julia console sessions. Modeled after MatlabSessionLexer.

    .. versionadded:: 1.6
    z
Julia consoleZjlconz
julia-replc	csœtf|jŽ}d}d}g}d}d}xX|jddD]F}|jdƒr~|jt|ƒdtj|dd…fgfƒ||dd…7}d}d}nî|jdƒs’|jd	ƒrÊ|tj|dd…fV|dt|dd…fVd}d}n¢|jd
ƒoØ|r|jt|ƒdt	|dd…fgfƒ||dd…7}n\|r4t
||j|ƒƒEdHd}g}|jdƒsF|rZ|tj|fVd}n|tj
|fVd}|t|ƒ7}q0W|r˜t
||j|ƒƒEdHdS)NrÚFT)Úkeependszjulia>ézhelp?>zshell>z      zERROR: )rÚoptionsÚ
splitlinesÚ
startswithÚappendÚlenrZPromptrrrÚget_tokens_unprocessedÚErrorZOutput)	Úselfr4ZjllexerÚstartZcurcodeZ
insertionsÚoutputÚerrorÚliner r r#rMsD
$"z(JuliaConsoleLexer.get_tokens_unprocessedN)r6r7r8r9r:r<rMr r r r#r÷sN) r9Zpygments.lexerrrrrrrZpygments.tokenrr	r
rrr
rrrrZ
pygments.utilrZpygments.lexers._julia_builtinsrrrrrÚ__all__r?rArrr r r r#Ú<module>	s 0]