3
V'íc®= ã @ s d Z ddlZddlmZmZmZ ddlmZmZm Z m
Z
mZmZm
Z
mZmZmZmZ dddgZG dd deZG d d deZG d
d deZdS )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È e Zd ZdZdZdgZddgZdgZdZed Z e d d
d d d
Z
dZdZde d Z
de d Zde
d Zde d Zde d ZdZde d e
d e d Ze
d e
d e d Zde d e d Zde e Zde Zde d e d Zde d d! e d d" e
d# e d$ e
d% e d& Zd'Zd(efd)efd*efd+e d ejfd+e d ejfd,e ejfd+e d- e d e ej!e"ej#fd.ej$fd/ej%fd0e d1 e d e&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+dAfgdDe dE e+j,dFfdGe dH e+j,dFfdIe+j,dFfgdJe e)ej$dKfdLe)dKfe-dKgdMZ.dNS )Or zp
Lexer for `SPARQL <https://www.w3.org/TR/sparql11-query/>`_ query language.
.. versionadded:: 2.0
ZSPARQLZsparqlz*.rqz*.sparqlzapplication/sparql-queryuJ a-zA-ZÃ-ÃÃ-öø-Ë¿Í°-ͽͿ-á¿¿â-ââ°-ââ°-⿯ã-í¿ï¤-ï·ï·°-�Ú_z\-z0-9õ ·u Ì-ͯu â¿-âz 0-9A-Fa-fz _~.\-!$&"()*+,;=/?#@%ú[ú]z<(?:[^<>"{}|^`\\\x00-\x20])*>z_:[0-9z](?:[z.]*z)?z(?:[z[0-9z][u 0-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ÚEXPONENTr r r ÚLabelÚVariabler Ú Namespacer ÚTagÚFunctionÚConstantr ÚFloatÚIntegerr r r ÚEscaper Útokens© rD rD ú7/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/rdf.pyr s
<
c @ sl e Zd ZdZdZdgZdgZddgZdZed Z e d d
d d d
Z
de
d Zde d Zed e
d e d Z
dZde d Zde e ZdZde d Zde Zde d e d Zde d d e d d e
d e d e
d e d Zd!d"d#Zd$efd%e eeeejeefd&e eeeejeejeefd'ejfd(e ejfd)e
d* e d eejeej 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)dAfdBe ee'e(j)dAfe*dAgdCZ+dDdE Z,dFS )Gr zf
Lexer for `Turtle <http://www.w3.org/TR/turtle/>`_ data language.
.. versionadded:: 2.1
ZTurtleZturtlez*.ttlztext/turtlezapplication/x-turtleuJ a-zA-ZÃ-ÃÃ-öø-Ë¿Í°-ͽͿ-á¿¿â-ââ°-ââ°-⿯ã-í¿ï¤-ï·ï·°-�r z\-z0-9r u Ì-ͯu â¿-âr r z(?:[z.]*z)?z 0-9A-Fa-fr z _~.\-!$&"()*+,;=/?#@%z\\z(?:z)|(?:r z:0-9z]|z(?:(?:[z.:]|z)*(?:[z:]|z))?z((?:[a-zA-Z][\w-]*)?\:)z(<[^<>"{}|^`\\\x00-\x20]*>))ZPNAME_NSr2 z\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)sr z)?(\:)(z#[^\n]+z\b(true|false)\bz[+\-]?\d*\.\d+z[+\-]?\d*(:?\.\d+)?E[+\-]?\d+z [+\-]?\d+z[\[\](){}.;,:^]z"""ztriple-double-quoted-stringr zsingle-double-quoted-stringz'''ztriple-single-quoted-stringr zsingle-single-quoted-stringz
end-of-stringz[^\\]+z
string-escapez [^"\\\n]+z [^'\\\n]+r z#popz (@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)z#pop:2z(\^\^)%(IRIREF)s)r ztriple-double-quoted-stringzsingle-double-quoted-stringztriple-single-quoted-stringzsingle-single-quoted-stringz
string-escapez
end-of-stringc C s&