2004-02-09 14:18:27 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE language SYSTEM "language.dtd">
|
|
|
|
|
2007-11-06 01:50:09 +00:00
|
|
|
<language name="Logtalk" version="1.95" kateversion="2.4" section="Sources" extensions="*.lgt;*.config" mimetype="text/x-logtalk" author="Paulo Moura (pmoura@logtalk.org)" license="Artistic License 2.0">
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-04-23 00:57:45 +01:00
|
|
|
<highlighting>
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-04-23 00:57:45 +01:00
|
|
|
<contexts>
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-08-08 13:13:45 +01:00
|
|
|
<context name = "normal" attribute = "Normal" lineEndContext = "#stay" >
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Directives -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "^\s*:-" attribute = "Normal" context = "directive" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Event handlers -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(after|before)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Method execution context -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(parameter|this|se(lf|nder))(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Reflection -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(current_predicate|predicate_property)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- DCGs -->
|
2006-03-26 18:31:34 +01:00
|
|
|
<RegExpr String = "\b(expand_term|term_expansion|phrase)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Entity -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\b(object|protocol|category)_property(?=[(])" attribute = "Built-in" context = "#stay" />
|
2006-03-26 18:31:34 +01:00
|
|
|
<!-- Entity relations -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\bextends_(object|protocol)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2007-11-06 01:50:09 +00:00
|
|
|
<RegExpr String = "\bimp(lements_protocol|orts_category)(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\b(instantiat|specializ)es_class(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Events -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(current_event|(abolish|define)_events)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2005-02-10 00:02:06 +00:00
|
|
|
<!-- Flags -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(current|set)_logtalk_flag(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<!-- Compiling, loading, and library paths -->
|
|
|
|
<RegExpr String = "\blogtalk_(compile|l(ibrary_path|oad))(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Database -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(clause|retract(all)?)(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\ba(bolish|ssert(a|z))(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Control -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(ca(ll|tch)|throw)(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\b(fail|true)\b" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- All solutions -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b((bag|set)of|f(ind|or)all)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2006-11-07 17:11:47 +00:00
|
|
|
<!-- Multi-threading meta-predicates -->
|
2007-11-06 01:50:09 +00:00
|
|
|
<RegExpr String = "\bthreaded(_(call|once|ignore|exit|peek|wait|notify))?(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Term unification -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\bunify_with_occurs_check(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Term creation and decomposition -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(functor|arg|copy_term)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Evaluable functors -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(rem|mod|abs|sign)(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\bfloat(_(integer|fractional)_part)?(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\b(floor|truncate|round|ceiling)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2006-03-26 18:31:34 +01:00
|
|
|
<!-- Other arithmetic functors -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(cos|atan|exp|log|s(in|qrt))(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Term testing -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Stream selection and control -->
|
2007-11-06 01:50:09 +00:00
|
|
|
<RegExpr String = "\b(curren|se)t_(in|out)put(?=[(])" attribute = "Built-in" context = "#stay" />
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(open|close)(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\bflush_output(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\bflush_output\b" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-06-06 23:46:45 +01:00
|
|
|
<!-- Character and byte input/output -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\bnl\b" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Term input/output -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\bread(_term)?(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\bwrite(q|_(canonical|term))?(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\b(current_)?op(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\b(current_)?char_conversion(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Atomic term processing -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\batom_(length|c(hars|o(ncat|des)))(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\b(char_code|sub_atom)(?=[(])" attribute = "Built-in" context = "#stay" />
|
2007-11-06 01:50:09 +00:00
|
|
|
<RegExpr String = "\bnumber_c(har|ode)s(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Implementation defined hooks functions -->
|
2007-11-06 01:50:09 +00:00
|
|
|
<RegExpr String = "\b(se|curren)t_prolog_flag(?=[(])" attribute = "Built-in" context = "#stay" />
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\bhalt\b" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\bhalt(?=[(])" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Variables -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b[A-Z_]\w*" attribute = "Variable" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Comments -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<DetectChar char = "%" attribute = "Comment" context = "single line comment" />
|
|
|
|
<Detect2Chars char = "/" char1 = "*" attribute = "Comment" context = "multiline comment" beginRegion = "Comment" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Strings and quoted atoms -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<DetectChar char = """ attribute = "String" context = "string" />
|
|
|
|
<DetectChar char = "'" attribute = "String" context = "atom" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Numbers -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "0'." attribute = "Number" context = "#stay" />
|
|
|
|
<RegExpr String = "0b[0-1]+" attribute = "Number" context = "#stay" />
|
|
|
|
<RegExpr String = "0o[0-7]+" attribute = "Number" context = "#stay" />
|
|
|
|
<RegExpr String = "0x[0-9a-fA-F]+" attribute = "Number" context = "#stay" />
|
|
|
|
<RegExpr String = "\d+(\.\d+)?([eE]([-+])?\d+)?" attribute = "Number" context = "#stay" />
|
2005-04-23 00:57:45 +01:00
|
|
|
<!-- Message sending operators -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<Detect2Chars char = ":" char1 = ":" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "^" char1 = "^" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- External call -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<DetectChar char = "{" attribute = "Operator" context = "#stay" beginRegion="external" />
|
|
|
|
<DetectChar char = "}" attribute = "Operator" context = "#stay" endRegion="external" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Logic and control -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\bonce(?=[(])" attribute = "Built-in" context = "#stay" />
|
|
|
|
<RegExpr String = "\brepeat\b" attribute = "Built-in" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Bitwise functors -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<Detect2Chars char = ">" char1 = ">" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "<" char1 = "<" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "/" char1 = "\" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "\" char1 = "/" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "\" char1 = "\" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Arithemtic evaluation -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\bis\b" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Arithemtic comparison -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<StringDetect String = "=:=" attribute = "Operator" context = "#stay" />
|
|
|
|
<StringDetect String = "=\=" attribute = "Operator" context = "#stay" />
|
|
|
|
<DetectChar char = "<" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "=" char1 = "<" attribute = "Operator" context = "#stay" />
|
|
|
|
<DetectChar char = ">" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = ">" char1 = "=" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Term creation and decomposition -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<StringDetect String = "=.." attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Term unification -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<DetectChar char = "=" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "\" char1 = "=" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Term comparison -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<Detect2Chars char = "=" char1 = "=" attribute = "Operator" context = "#stay" />
|
|
|
|
<StringDetect String = "\==" attribute = "Operator" context = "#stay" />
|
|
|
|
<StringDetect String = "@=<" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "@" char1 = "<" attribute = "Operator" context = "#stay" />
|
|
|
|
<StringDetect String = "@>=" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "@" char1 = ">" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Evaluable functors -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<Detect2Chars char = "/" char1 = "/" attribute = "Operator" context = "#stay" />
|
|
|
|
<AnyChar String = "+-*/" attribute = "Operator" context = "#stay" />
|
|
|
|
<RegExpr String = "\b(mod|rem)\b" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Other arithemtic functors -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<Detect2Chars char = "*" char1 = "*" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- DCG rules -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<StringDetect String = "-->" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Control constructs -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<AnyChar String = "!;" attribute = "Operator" context = "#stay" />
|
|
|
|
<Detect2Chars char = "-" char1 = ">" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Logic and control -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<Detect2Chars char = "\" char1 = "+" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Mode operators -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<AnyChar String = "?@" attribute = "Operator" context = "#stay" />
|
2007-06-12 11:39:47 +01:00
|
|
|
<!-- Category predicate direct call operator -->
|
|
|
|
<AnyChar String = ":" attribute = "Operator" context = "#stay" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Clause operator -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<Detect2Chars char = ":" char1 = "-" firstNonSpace = "false" attribute = "Normal" context = "#stay" />
|
2004-06-06 23:46:45 +01:00
|
|
|
<!-- Atoms -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b[a-z]\w*" attribute = "Normal" context = "#stay" />
|
2005-04-23 00:57:45 +01:00
|
|
|
</context>
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-08-08 13:13:45 +01:00
|
|
|
<context name = "directive" attribute = "Directive" lineEndContext = "#stay" >
|
2005-04-23 00:57:45 +01:00
|
|
|
<!-- Entity directives -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\b(category|object|protocol)(?=[(])" attribute = "Directive" context = "entityrelations" beginRegion = "Entity"/>
|
|
|
|
<RegExpr String = "\bend_(category|object|protocol)[.]" attribute = "Directive" context = "#pop" endRegion = "Entity" />
|
2005-12-24 18:00:21 +00:00
|
|
|
<RegExpr String = "\bmodule(?=[(])" attribute = "Directive" context = "#pop"/>
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Predicate scope directives -->
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\bp(ublic|r(otected|ivate))(?=[(])" attribute = "Directive" context = "#pop" />
|
2004-02-09 14:18:27 +00:00
|
|
|
<!-- Other directives -->
|
2005-12-24 18:00:21 +00:00
|
|
|
<RegExpr String = "\be(ncoding|xport)(?=[(])" attribute = "Directive" context = "#pop" />
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\bin(fo|itialization)(?=[(])" attribute = "Directive" context = "#pop" />
|
2007-03-28 23:44:31 +01:00
|
|
|
<RegExpr String = "\b(dynamic|synchronized|threaded)[.]" attribute = "Directive" context = "#pop" />
|
2007-11-06 01:50:09 +00:00
|
|
|
<RegExpr String = "\b(alias|d(ynamic|iscontiguous)|m(eta_predicate|ode|ultifile)|synchronized)(?=[(])" attribute = "Directive" context = "#pop" />
|
2005-08-08 13:13:45 +01:00
|
|
|
<RegExpr String = "\bop(?=[(])" attribute = "Directive" context = "#pop" />
|
2005-12-24 18:00:21 +00:00
|
|
|
<RegExpr String = "\b(calls|use(s|_module))(?=[(])" attribute = "Directive" context = "#pop" />
|
2005-04-23 00:57:45 +01:00
|
|
|
</context>
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-08-08 13:13:45 +01:00
|
|
|
<context name = "entityrelations" attribute = "Normal" lineEndContext = "#stay" >
|
|
|
|
<RegExpr String = "\b(extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])" attribute = "Directive" context = "#stay" />
|
|
|
|
<Detect2Chars attribute = "Normal" context = "normal" char = ")" char1 = "." />
|
2005-04-23 00:57:45 +01:00
|
|
|
</context>
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-08-08 13:13:45 +01:00
|
|
|
<context name = "single line comment" attribute = "Comment" lineEndContext = "#pop" />
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-08-08 13:13:45 +01:00
|
|
|
<context name = "multiline comment" attribute = "Comment" lineEndContext = "#stay" >
|
|
|
|
<Detect2Chars char = "*" char1 = "/" attribute = "Comment" context = "#pop" endRegion = "Comment" />
|
2005-04-23 00:57:45 +01:00
|
|
|
</context>
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-08-08 13:13:45 +01:00
|
|
|
<context name = "string" attribute = "String" lineEndContext = "#stay" >
|
|
|
|
<DetectChar char = """ attribute = "String" context = "#pop" />
|
2005-04-23 00:57:45 +01:00
|
|
|
</context>
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-08-08 13:13:45 +01:00
|
|
|
<context name = "atom" attribute = "String" lineEndContext = "#stay" >
|
|
|
|
<DetectChar char = "'" attribute = "String" context = "#pop" />
|
2005-04-23 00:57:45 +01:00
|
|
|
</context>
|
2004-02-09 14:18:27 +00:00
|
|
|
|
2005-04-23 00:57:45 +01:00
|
|
|
</contexts>
|
2004-02-09 14:18:27 +00:00
|
|
|
|
|
|
|
<itemDatas>
|
2005-08-08 13:13:45 +01:00
|
|
|
<itemData name = "Normal" defStyleNum = "dsNormal" />
|
|
|
|
<itemData name = "Directive" defStyleNum = "dsKeyword" />
|
|
|
|
<itemData name = "Built-in" defStyleNum = "dsKeyword" />
|
|
|
|
<itemData name = "Operator" defStyleNum = "dsDataType" />
|
|
|
|
<itemData name = "Comment" defStyleNum = "dsComment" />
|
|
|
|
<itemData name = "Number" defStyleNum = "dsDecVal" />
|
|
|
|
<itemData name = "String" defStyleNum = "dsString" />
|
|
|
|
<itemData name = "Variable" defStyleNum = "dsOthers" />
|
2004-02-09 14:18:27 +00:00
|
|
|
</itemDatas>
|
|
|
|
|
|
|
|
</highlighting>
|
|
|
|
|
|
|
|
<general>
|
|
|
|
<comments>
|
2005-08-08 13:13:45 +01:00
|
|
|
<comment name = "singleLine" start = "%" />
|
|
|
|
<comment name = "multiLine" start = "/*" end = "*/" region = "Comment" />
|
2004-02-09 14:18:27 +00:00
|
|
|
</comments>
|
|
|
|
<keywords casesensitive="true" />
|
|
|
|
</general>
|
|
|
|
|
|
|
|
</language>
|