3

V'íc®=ã@s’dZddlZddlmZmZmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZdddgZGdd„deƒZGd	d„deƒZGd
d„deƒZdS)zæ
    pygments.lexers.rdf
    ~~~~~~~~~~~~~~~~~~~

    Lexers for semantic web and RDF query languages and markup.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
éN)Ú
RegexLexerÚbygroupsÚdefault)ÚKeywordÚPunctuationÚStringÚNumberÚOperatorÚGenericÚ
WhitespaceÚNameÚLiteralÚCommentÚTextÚSparqlLexerÚTurtleLexerÚ
ShExCLexerc@sÈeZdZdZdZdgZddgZdgZdZedZ	e	d	d
ddd
Z
dZdZdedZ
de	dZde
dZdedZdedZdZde	de
dedZe
de
dedZde	de	dZdeeZdeZdededZde	d d!edd"e
d#ed$e
d%ed&Zd'Zd(efd)efd*efd+edejfd+edejfd,eejfd+ed-ede ej!e"ej#ƒfd.ej$fd/ej%fd0ed1ede&j'fd2e&j'fd3e&j(fd4e)fd5e"fd6e*fd7e+d8fd9e+d:fd;e+d<fd=e+d>fgd7e+d?fd@e+fde+dAfgd9e+d?fdBe+fde+dAfgd;e+d?fd@e+fde+j,dAfgd=e+d?fdCe+fde+dAfgdDedEe+j,dFfdGedHe+j,dFfdIe+j,dFfgdJe e)ej$ƒdKfdLe)dKfe-dKƒgdMœZ.dNS)Orzp
    Lexer for `SPARQL <https://www.w3.org/TR/sparql11-query/>`_ query language.

    .. versionadded:: 2.0
    ZSPARQLZsparqlz*.rqz*.sparqlzapplication/sparql-queryuJa-zA-ZÀ-ÖØ-öø-Ë¿Í°-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�Ú_z\-z0-9õ·ù-ͯu‿-⁀z	0-9A-Fa-fz _~.\-!$&"()*+,;=/?#@%ú[ú]z<(?:[^<>"{}|^`\\\x00-\x20])*>z_:[0-9z](?:[z.]*z)?z(?:[z[0-9z][u0-9·̀-ͯ‿-⁀]*ú%z\\z(?:z)|(?:ú)z:0-9z]|z(?:(?:[z.:]|z)*(?:[z:]|z))?z[eE][+-]?\d+z\s+ay(?i)(select|construct|describe|ask|where|filter|group\s+by|minus|distinct|reduced|from\s+named|from|order\s+by|desc|asc|limit|offset|values|bindings|load|into|clear|drop|create|add|move|copy|insert\s+data|delete\s+data|delete\s+where|with|delete|insert|using\s+named|using|graph|default|named|all|optional|service|silent|bind|undef|union|not\s+in|in|as|having|to|prefix|base)\bz(a)\bú(z[?$]z)?(\:)(a²(?i)(str|lang|langmatches|datatype|bound|iri|uri|bnode|rand|abs|ceil|floor|round|concat|strlen|ucase|lcase|encode_for_uri|contains|strstarts|strends|strbefore|strafter|year|month|day|hours|minutes|seconds|timezone|tz|now|uuid|struuid|md5|sha1|sha256|sha384|sha512|coalesce|if|strlang|strdt|sameterm|isiri|isuri|isblank|isliteral|isnumeric|regex|substr|replace|exists|not\s+exists|count|sum|min|max|avg|sample|group_concat|separator)\bz(true|false)z[+\-]?(\d+\.\d*z|\.?\d+z[+\-]?(\d+\.\d*|\.\d+)z	[+\-]?\d+z%(\|\||&&|=|\*|\-|\+|/|!=|<=|>=|!|<|>)z[(){}.;,:^\[\]]z#[^\n]*z"""ztriple-double-quoted-stringú"zsingle-double-quoted-stringz'''ztriple-single-quoted-stringú'zsingle-single-quoted-stringz
end-of-stringz[^\\]+z
string-escapez	[^"\\\n]+z	[^'\\\n]+Úuz{4}z#popÚUz{8}Ú.z (@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)z#pop:2z\^\^)Úrootztriple-double-quoted-stringzsingle-double-quoted-stringztriple-single-quoted-stringzsingle-single-quoted-stringz
string-escapez
end-of-stringN)/Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚPN_CHARS_BASE_GRPÚPN_CHARS_U_GRPÚPN_CHARS_GRPÚHEX_GRPÚPN_LOCAL_ESC_CHARS_GRPÚ
PN_CHARS_BASEÚ
PN_CHARS_UÚPN_CHARSÚHEXÚPN_LOCAL_ESC_CHARSÚIRIREFÚBLANK_NODE_LABELÚ	PN_PREFIXZVARNAMEÚPERCENTÚPN_LOCAL_ESCÚPLXÚPN_LOCALÚEXPONENTrrrÚLabelÚVariablerÚ	NamespacerÚTagÚFunctionÚConstantrÚFloatÚIntegerr	rrÚEscaperÚtokens©rDrDú7/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/rdf.pyrs†
<



c@sleZdZdZdZdgZdgZddgZdZedZ	e	d	d
ddd
Z
de
dZdedZede
dedZ
dZdedZdeeZdZdedZdeZdededZde	ddedde
dede
ded Zd!d"d#œZd$efd%eeeeejeeƒfd&eeeeejeejeeƒfd'ejfd(eejfd)e
d*edeejeej ƒfd+e!fd,e"fd-e#j$fd.e#j$fd/e#j%fd0efd1e&d2fd3e&d4fd5e&d6fd7e&d8fgd1e&d9fd:e&fde&d;fgd3e&d9fd<e&fde&d;fgd5e&d9fd:e&fde&d;fgd7e&d9fd=e&fde&d;fgd>e&d?fgd@ee'e(j)ƒdAfdBeee'e(j)ƒdAfe*dAƒgdCœZ+dDdE„Z,dFS)Grzf
    Lexer for `Turtle <http://www.w3.org/TR/turtle/>`_ data language.

    .. versionadded:: 2.1
    ZTurtleZturtlez*.ttlztext/turtlezapplication/x-turtleuJa-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�rz\-z0-9rù-ͯu‿-⁀rrz(?:[z.]*z)?z	0-9A-Fa-frz _~.\-!$&"()*+,;=/?#@%z\\z(?:z)|(?:rz:0-9z]|z(?:(?:[z.:]|z)*(?:[z:]|z))?z((?:[a-zA-Z][\w-]*)?\:)z(<[^<>"{}|^`\\\x00-\x20]*>))ZPNAME_NSr2z\s+z%(@base|BASE)(\s+)%(IRIREF)s(\s*)(\.?)z:(@prefix|PREFIX)(\s+)%(PNAME_NS)s(\s+)%(IRIREF)s(\s*)(\.?)z(?<=\s)a(?=\s)z
%(IRIREF)srz)?(\:)(z#[^\n]+z\b(true|false)\bz[+\-]?\d*\.\d+z[+\-]?\d*(:?\.\d+)?E[+\-]?\d+z	[+\-]?\d+z[\[\](){}.;,:^]z"""ztriple-double-quoted-stringrzsingle-double-quoted-stringz'''ztriple-single-quoted-stringrzsingle-single-quoted-stringz
end-of-stringz[^\\]+z
string-escapez	[^"\\\n]+z	[^'\\\n]+rz#popz (@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)z#pop:2z(\^\^)%(IRIREF)s)rztriple-double-quoted-stringzsingle-double-quoted-stringztriple-single-quoted-stringzsingle-single-quoted-stringz
string-escapez
end-of-stringcCs&x dD]}tjd||ƒrdSqWdS)Nú@base úBASE ú@prefix úPREFIX z^\s*%sgš™™™™™é?)rFrGrHrI)ÚreÚsearch)ÚtextÚtrDrDrEÚanalyse_text9s
zTurtleLexer.analyse_textN)-r r!r"r#r$r%r&r'r(r)r*r/r-r4r+r0r5r,r1r6r7r8Úpatternsrrrrrr;rr<ÚTyper=rr
rr@rArr	r
ZEmphrrCrNrDrDrDrEr²sz
<





c@s²eZdZdZdZddgZdgZdgZdZedZ	e	d	d
ddd
Z
dZdZdedZ
de	dZde
dZdedZdedZdededZdeZdedZde	de
dedZe
de
dedZdeeZdeZdeded Zde	d!d"ed d#e
d$ed%e
d&ed'Zd(Zd)efd*efd+efd,ed ejfd,ed ejfd,ed-ede ej!e"ej#ƒfd.ej$fd/ed0ed e%j&fd1e%j&fd2e%j'fd3e(fd4e(j)fd5e"fd6e*fd7e+d8fd9e+d:fd;e+d<fd=e+d>fgd7e+d?fd@e+fde+dAfgd9e+d?fdBe+fde+dAfgd;e+d?fd@e+fde+j,dAfgd=e+d?fdCe+fde+dAfgee+j,dDfdEe+j,dDfgdFe e(ej-ƒdGfdHe(dGfe.dGƒgdIœZ/dJS)Krzg
    Lexer for `ShExC <https://shex.io/shex-semantics/#shexc>`_ shape expressions language syntax.
    ZShExCZshexcZshexz*.shexz	text/shexuJa-zA-ZÀ-ÖØ-öø-Ë¿Í°-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�rz\-z0-9rù-ͯu‿-⁀z	0-9A-Fa-fz_~.\-!$&'()*+,;=/?#@%rrz(?:uz{4}|Uz{8})z\\z<(?:[^\x00-\x20<>"{}|^`\\]|z)*>z_:[0-9z](?:[z.]*z)?z(?:[rz(?:z)|(?:rz:0-9z]|z(?:(?:[z.:]|z)*(?:[z:]|z))?z[eE][+-]?\d+z\s+z¶(?i)(base|prefix|start|external|literal|iri|bnode|nonliteral|length|minlength|maxlength|mininclusive|minexclusive|maxinclusive|maxexclusive|totaldigits|fractiondigits|closed|extra)\bz(a)\brz)?(\:)(z(true|false)z[+\-]?(\d+\.\d*z|\.?\d+z[+\-]?(\d+\.\d*|\.\d+)z	[+\-]?\d+z[@|$&=*+?^\-~]z(?i)(and|or|not)\bz[(){}.;,:^\[\]]z#[^\n]*z"""ztriple-double-quoted-stringrzsingle-double-quoted-stringz'''ztriple-single-quoted-stringrzsingle-single-quoted-stringz
end-of-stringz[^\\]+z
string-escapez	[^"\\\n]+z	[^'\\\n]+z#poprz (@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)z#pop:2z\^\^)rztriple-double-quoted-stringzsingle-double-quoted-stringztriple-single-quoted-stringzsingle-single-quoted-stringz
string-escapez
end-of-stringN)0r r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1ZUCHAR_NO_BACKSLASHZUCHARr2r3r4r5r6r7r8r9rrrr:rr<rr=r?rr@rAr	ÚWordrrrBr>rrCrDrDrDrEr?s€
<




)r#rJZpygments.lexerrrrZpygments.tokenrrrrr	r
rrr
rrÚ__all__rrrrDrDrDrEÚ<module>	s4