3

V'íc?0ã@spdZddlZddlmZmZddlmZmZmZm	Z	m
Z
mZmZm
Z
ddgZGdd„deƒZGdd„deƒZdS)	zÝ
    pygments.lexers.prolog
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Prolog and Prolog-like languages.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
éN)Ú
RegexLexerÚbygroups)ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚPrologLexerÚLogtalkLexerc@s,eZdZdZdZdgZddddgZdgZd	ej	d
fdej
fdejfd
e
jfde
jfde
jfde
jfde
jfde
jfdefdefdejfdejfdefdefdefdefdeejeƒfdeejeeƒfdeejeeƒfdejfdejfd ejfd!efgd"ej	d#fd	ej	d$fd%ej	fd&ej	fgd'œZd(d)„Zd*S)+rz!
    Lexer for Prolog files.
    ZPrologZprologz*.eclz*.prologz*.proz*.plz
text/x-prologz/\*znested-commentz%.*z0\'.z0b[01]+z0o[0-7]+z0x[0-9a-fA-F]+z\d\d?\'[a-zA-Z0-9]+z%(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?z\d+z[\[\](){}|.,;!]z:-|-->z`"(?:\\x[0-9a-fA-F]+\\|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|\\[0-7]+\\|\\["\\abcefnrstv]|[^\\"])*"z'(?:''|[^'])*'zis\bz5(<|>|=<|>=|==|=:=|=|/|//|\*|\+|-)(?=\s|[a-zA-Z0-9\[])z(mod|div|not)\bÚ_z([a-z]+)(:)zh([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef][\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)(\s*)(:-|-->)zd([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef][\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)(\s*)(\()zY[a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef][\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*z/[#&*+\-./:<=>?@\\^~\u00a1-\u00bf\u2010-\u303f]+z	[A-Z_]\w*z&\s+|[\u2000-\u200f\ufff0-\ufffe\uffef]z\*/z#popz#pushz[^*/]+z[*/])Úrootznested-commentcCsd|kS)Nz:-©)Útextrrú:/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/prolog.pyÚanalyse_textPszPrologLexer.analyse_textN) Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesrZ	MultilineÚSingler	ZCharr
ÚBinÚOctÚHexZIntegerZFloatrÚDoubleZAtomrrrrÚ	NamespaceZFunctionrÚVariableÚtokensrrrrrrsP


cU@s<eZdZdZdZdZdgZddgZdgZde	d	fd
e
fde
fdefd
efdefdej
fdejfdejfdefdejfdefdefdefdefdefdefdefdefdefdefdefdefd efd!efd"efd#efd$efd%efd&efd'efd(efd)efd*efd+efd,efd-efd.efd/efd0efd1efd2efd3efd4efd5efd6efd7efd8efd9efd:efd;efd<efd=efd>efd?efd@efdAefdBefdCefdDefdEefdFefdGefdHefdIefdJefdKefdLefdMefdNefdOefdPefdQefdRefdSefdTefdUefdVefdWefdXefdYefdZefd[ed\fgSd]efd[ed^fd_ejfd`efdaefgdbedcfddedcfdeedffdgedcfdhedcfdiedcfdjedcfdkedcfdledcfdmedcfdnedcfdoedcfdpedcfg
dqefdefdej
fdejfdejfdefdejfdZefd[ed\fdXefdredcfdsefdYefd
e
fde
fdefd
efgdtœZdudv„ZdwS)xr
z>
    For Logtalk source code.

    .. versionadded:: 0.10
    ZLogtalkzhttp://logtalk.org/Zlogtalkz*.lgtz	*.logtalkztext/x-logtalkz^\s*:-\sÚ	directivez%.*?\nz/\*(.|\n)*?\*/z\nz\s+z0'[\\]?.z0b[01]+z0o[0-7]+z0x[0-9a-fA-F]+z\d+\.?\d*((e|E)(\+|-)?\d+)?z([A-Z_][a-zA-Z0-9_]*)z(after|before)(?=[(])zforward(?=[(])z+(context|parameter|this|se(lf|nder))(?=[(])z-(current_predicate|predicate_property)(?=[(])z8(expand_(goal|term)|(goal|term)_expansion|phrase)(?=[(])z;(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])z*(object|protocol|category)_property(?=[(])z.co(mplements_object|nforms_to_protocol)(?=[(])z)extends_(object|protocol|category)(?=[(])z*imp(lements_protocol|orts_category)(?=[(])z%(instantiat|specializ)es_class(?=[(])z.(current_event|(abolish|define)_events)(?=[(])z((create|current|set)_logtalk_flag(?=[(])zMlogtalk_(compile|l(ibrary_path|oad|oad_context)|make(_target_action)?)(?=[(])z\blogtalk_make\bz(clause|retract(all)?)(?=[(])za(bolish|ssert(a|z))(?=[(])z(ca(ll|tch)|throw)(?=[(])z0(fa(il|lse)|true|(instantiation|system)_error)\bzY(type|domain|existence|permission|representation|evaluation|resource|syntax)_error(?=[(])z!((bag|set)of|f(ind|or)all)(?=[(])zBthreaded(_(ca(ll|ncel)|once|ignore|exit|peek|wait|notify))?(?=[(])zRthreaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?(?=[(])z.(subsumes_term|unify_with_occurs_check)(?=[(])z8(functor|arg|copy_term|numbervars|term_variables)(?=[(])z%(div|rem|m(ax|in|od)|abs|sign)(?=[(])z)float(_(integer|fractional)_part)?(?=[(])z*(floor|t(an|runcate)|round|ceiling)(?=[(])z6(cos|a(cos|sin|tan|tan2)|exp|log|s(in|qrt)|xor)(?=[(])zZ(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|ground|acyclic_term)(?=[(])zcompare(?=[(])z(curren|se)t_(in|out)put(?=[(])z(open|close)(?=[(])zflush_output(?=[(])z!(at_end_of_stream|flush_output)\bz=(stream_property|at_end_of_stream|set_stream_position)(?=[(])z,(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])z\bnl\bzread(_term)?(?=[(])z"write(q|_(canonical|term))?(?=[(])z(current_)?op(?=[(])z!(current_)?char_conversion(?=[(])z(atom_(length|c(hars|o(ncat|des)))(?=[(])z(char_code|sub_atom)(?=[(])znumber_c(har|ode)s(?=[(])z(se|curren)t_prolog_flag(?=[(])z\bhalt\bzhalt(?=[(])z(::|:|\^\^)z[{}]z(ignore|once)(?=[(])z
\brepeat\bz(key)?sort(?=[(])z(>>|<<|/\\|\\\\|\\)z\bas\bz\bis\bz(=:=|=\\=|<|=<|>=|>)z=\.\.z(=|\\=)z(==|\\==|@=<|@<|@>=|@>)z(//|[-+*/])z\b(e|pi|div|mod|rem)\bz\b\*\*\bz-->z	([!;]|->)z\\+z[?@]z\^z"(\\\\|\\[^\\]|[^"\\])*"z[()\[\],.|]z[a-z][a-zA-Z0-9_]*ú'Úquoted_atomz''z#popz+\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)z	[^\\'\n]+z\\z(el)?if(?=[(])rz(e(lse|ndif))(?=[.])z!(category|object|protocol)(?=[(])Úentityrelationsz'(end_(category|object|protocol))(?=[.])z!(public|protected|private)(?=[(])z%e(n(coding|sure_loaded)|xport)(?=[(])z in(clude|itialization|fo)(?=[(])z/(built_in|dynamic|synchronized|threaded)(?=[.])zz(alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])z	op(?=[(])z:(c(alls|oinductive)|module|reexport|use(s|_module))(?=[(])z[a-z][a-zA-Z0-9_]*(?=[(])z[a-z][a-zA-Z0-9_]*(?=[.])zH(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])z([)]\.)z(::))rr&r$r'cCs@d|krdSd|krdSd|kr$dStjd|tjƒr8dSdSdS)Nz
:- object(gð?z:- protocol(z:- category(z
^:-\s[a-z]gÍÌÌÌÌÌì?g)ÚreÚsearchÚM)rrrrr&szLogtalkLexer.analyse_textN)rrrrrÚurlrrrrrrr
rrrrr"rrr	ZEscaper#rrrrrr
Tsú

)rr(Zpygments.lexerrrZpygments.tokenrrrrrr	r
rÚ__all__rr
rrrrÚ<module>	s(@