Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/logtalk.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd"> | 2 | <!DOCTYPE language SYSTEM "language.dtd"> | ||
3 | 3 | | |||
4 | <language name="Logtalk" version="3" kateversion="2.4" section="Sources" extensions="*.lgt;.logtalk" mimetype="text/x-logtalk" author="Paulo Moura (pmoura@logtalk.org)" license="Apache License 2.0"> | 4 | <language name="Logtalk" version="4" kateversion="2.4" section="Sources" extensions="*.lgt;.logtalk" mimetype="text/x-logtalk" author="Paulo Moura (pmoura@logtalk.org)" license="Apache License 2.0"> | ||
5 | 5 | | |||
6 | <highlighting> | 6 | <highlighting> | ||
7 | 7 | | |||
8 | <contexts> | 8 | <contexts> | ||
9 | 9 | | |||
10 | <context name = "normal" attribute = "Normal" lineEndContext = "#stay" > | 10 | <context name = "normal" attribute = "Normal" lineEndContext = "#stay" > | ||
11 | <!-- Directives --> | 11 | <!-- Directives --> | ||
12 | <RegExpr String = "^\s*:-" attribute = "Normal" context = "directive" /> | 12 | <RegExpr String = "^\s*:-" attribute = "Normal" context = "directive" /> | ||
Show All 27 Lines | |||||
40 | <RegExpr String = "\ba(bolish|ssert(a|z))(?=[(])" attribute = "Built-in" context = "#stay" /> | 40 | <RegExpr String = "\ba(bolish|ssert(a|z))(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
41 | <!-- Control --> | 41 | <!-- Control --> | ||
42 | <RegExpr String = "\b(ca(ll|tch)|throw)(?=[(])" attribute = "Built-in" context = "#stay" /> | 42 | <RegExpr String = "\b(ca(ll|tch)|throw)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
43 | <RegExpr String = "\b(fa(il|lse)|true|(instantiation|system)_error)\b" attribute = "Built-in" context = "#stay" /> | 43 | <RegExpr String = "\b(fa(il|lse)|true|(instantiation|system)_error)\b" attribute = "Built-in" context = "#stay" /> | ||
44 | <RegExpr String = "\b(type|domain|existence|permission|representation|evaluation|resource|syntax)_error(?=[(])" attribute = "Built-in" context = "#stay" /> | 44 | <RegExpr String = "\b(type|domain|existence|permission|representation|evaluation|resource|syntax)_error(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
45 | <!-- All solutions --> | 45 | <!-- All solutions --> | ||
46 | <RegExpr String = "\b((bag|set)of|f(ind|or)all)(?=[(])" attribute = "Built-in" context = "#stay" /> | 46 | <RegExpr String = "\b((bag|set)of|f(ind|or)all)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
47 | <!-- Multi-threading predicates --> | 47 | <!-- Multi-threading predicates --> | ||
48 | <RegExpr String = "\bthreaded(_(call|once|ignore|exit|peek|wait|notify))?(?=[(])" attribute = "Built-in" context = "#stay" /> | 48 | <RegExpr String = "\bthreaded(_(ca(ll|ncel)|once|ignore|exit|peek|wait|notify))?(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
49 | <!-- Engine predicates --> | 49 | <!-- Engine predicates --> | ||
50 | <RegExpr String = "\bthreaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?(?=[(])" attribute = "Built-in" context = "#stay" /> | 50 | <RegExpr String = "\bthreaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
51 | <!-- Term unification --> | 51 | <!-- Term unification --> | ||
52 | <RegExpr String = "\b(subsumes_term|unify_with_occurs_check)(?=[(])" attribute = "Built-in" context = "#stay" /> | 52 | <RegExpr String = "\b(subsumes_term|unify_with_occurs_check)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
53 | <!-- Term creation and decomposition --> | 53 | <!-- Term creation and decomposition --> | ||
54 | <RegExpr String = "\b(functor|arg|copy_term|numbervars|term_variables)(?=[(])" attribute = "Built-in" context = "#stay" /> | 54 | <RegExpr String = "\b(functor|arg|copy_term|numbervars|term_variables)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
55 | <!-- Evaluable functors --> | 55 | <!-- Evaluable functors --> | ||
56 | <RegExpr String = "\b(div|rem|m(ax|in|od)|abs|sign)(?=[(])" attribute = "Built-in" context = "#stay" /> | 56 | <RegExpr String = "\b(div|rem|m(ax|in|od)|abs|sign)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
▲ Show 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | |||||
162 | <AnyChar String = "^" attribute = "Operator" context = "#stay" /> | 162 | <AnyChar String = "^" attribute = "Operator" context = "#stay" /> | ||
163 | <!-- Atoms --> | 163 | <!-- Atoms --> | ||
164 | <RegExpr String = "\b[a-z]\w*" attribute = "Normal" context = "#stay" /> | 164 | <RegExpr String = "\b[a-z]\w*" attribute = "Normal" context = "#stay" /> | ||
165 | </context> | 165 | </context> | ||
166 | 166 | | |||
167 | <context name = "directive" attribute = "Directive" lineEndContext = "#stay" > | 167 | <context name = "directive" attribute = "Directive" lineEndContext = "#stay" > | ||
168 | <!-- Conditional compilation directives --> | 168 | <!-- Conditional compilation directives --> | ||
169 | <RegExpr String = "\bif(?=[(])" attribute = "Directive" context = "#pop" beginRegion = "CC" /> | 169 | <RegExpr String = "\bif(?=[(])" attribute = "Directive" context = "#pop" beginRegion = "CC" /> | ||
170 | <RegExpr String = "\bendif[.]" attribute = "Directive" context = "#pop" endRegion = "CC" /> | 170 | <RegExpr String = "\bendif(?=[.])" attribute = "Directive" context = "#pop" endRegion = "CC" /> | ||
171 | <RegExpr String = "\belif(?=[(])" attribute = "Directive" context = "#pop"/> | 171 | <RegExpr String = "\belif(?=[(])" attribute = "Directive" context = "#pop"/> | ||
172 | <RegExpr String = "\belse[.]" attribute = "Directive" context = "#pop" /> | 172 | <RegExpr String = "\belse(?=[.])" attribute = "Directive" context = "#pop" /> | ||
173 | <!-- Entity directives --> | 173 | <!-- Entity directives --> | ||
174 | <RegExpr String = "\b(category|object|protocol)(?=[(])" attribute = "Directive" context = "entityrelations" beginRegion = "Entity" /> | 174 | <RegExpr String = "\b(category|object|protocol)(?=[(])" attribute = "Directive" context = "entityrelations" beginRegion = "Entity" /> | ||
175 | <RegExpr String = "\bend_(category|object|protocol)[.]" attribute = "Directive" context = "#pop" endRegion = "Entity" /> | 175 | <RegExpr String = "\bend_(category|object|protocol)(?=[.])" attribute = "Directive" context = "#pop" endRegion = "Entity" /> | ||
176 | <RegExpr String = "\bmodule(?=[(])" attribute = "Directive" context = "#pop"/> | 176 | <RegExpr String = "\bmodule(?=[(])" attribute = "Directive" context = "#pop"/> | ||
177 | <!-- Predicate scope directives --> | 177 | <!-- Predicate scope directives --> | ||
178 | <RegExpr String = "\bp(ublic|r(otected|ivate))(?=[(])" attribute = "Directive" context = "#pop" /> | 178 | <RegExpr String = "\bp(ublic|r(otected|ivate))(?=[(])" attribute = "Directive" context = "#pop" /> | ||
179 | <!-- Other directives --> | 179 | <!-- Other directives --> | ||
180 | <RegExpr String = "\be(n(coding|sure_loaded)|xport)(?=[(])" attribute = "Directive" context = "#pop" /> | 180 | <RegExpr String = "\be(n(coding|sure_loaded)|xport)(?=[(])" attribute = "Directive" context = "#pop" /> | ||
181 | <RegExpr String = "\bin(clude|itialization|fo)(?=[(])" attribute = "Directive" context = "#pop" /> | 181 | <RegExpr String = "\bin(clude|itialization|fo)(?=[(])" attribute = "Directive" context = "#pop" /> | ||
182 | <RegExpr String = "\b(built_in|dynamic|synchronized|threaded)[.]" attribute = "Directive" context = "#pop" /> | 182 | <RegExpr String = "\b(built_in|dynamic|synchronized|threaded)(?=[.])" attribute = "Directive" context = "#pop" /> | ||
183 | <RegExpr String = "\b(alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])" attribute = "Directive" context = "#pop" /> | 183 | <RegExpr String = "\b(alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])" attribute = "Directive" context = "#pop" /> | ||
184 | <RegExpr String = "\bop(?=[(])" attribute = "Directive" context = "#pop" /> | 184 | <RegExpr String = "\bop(?=[(])" attribute = "Directive" context = "#pop" /> | ||
185 | <RegExpr String = "\b(c(alls|oinductive)|reexport|use(s|_module))(?=[(])" attribute = "Directive" context = "#pop" /> | 185 | <RegExpr String = "\b(c(alls|oinductive)|reexport|use(s|_module))(?=[(])" attribute = "Directive" context = "#pop" /> | ||
186 | </context> | 186 | </context> | ||
187 | 187 | | |||
188 | <context name = "entityrelations" attribute = "Normal" lineEndContext = "#stay" > | 188 | <context name = "entityrelations" attribute = "Normal" lineEndContext = "#stay" > | ||
189 | <RegExpr String = "\b(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])" attribute = "Directive" context = "#stay" /> | 189 | <RegExpr String = "\b(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])" attribute = "Directive" context = "#stay" /> | ||
190 | <!-- Variables --> | 190 | <!-- Variables --> | ||
Show All 23 Lines | 213 | <context name = "multiline comment" attribute = "Comment" lineEndContext = "#stay" > | |||
214 | <Detect2Chars char = "*" char1 = "/" attribute = "Comment" context = "#pop" endRegion = "Comment" /> | 214 | <Detect2Chars char = "*" char1 = "/" attribute = "Comment" context = "#pop" endRegion = "Comment" /> | ||
215 | </context> | 215 | </context> | ||
216 | 216 | | |||
217 | <context name = "string" attribute = "String" lineEndContext = "#stay" > | 217 | <context name = "string" attribute = "String" lineEndContext = "#stay" > | ||
218 | <DetectChar char = """ attribute = "String" context = "#pop" /> | 218 | <DetectChar char = """ attribute = "String" context = "#pop" /> | ||
219 | </context> | 219 | </context> | ||
220 | 220 | | |||
221 | <context name = "atom" attribute = "String" lineEndContext = "#stay" > | 221 | <context name = "atom" attribute = "String" lineEndContext = "#stay" > | ||
222 | <RegExpr attribute="String Char" context="#stay" String="\\x[a-fA-F0-9]+\\"/> | ||||
223 | <RegExpr attribute="String Char" context="#stay" String="\\[0-7]+\\"/> | ||||
224 | <HlCStringChar attribute="String Char" context="#stay"/> | ||||
222 | <DetectChar char = "'" attribute = "String" context = "#pop" /> | 225 | <DetectChar char = "'" attribute = "String" context = "#pop" /> | ||
223 | </context> | 226 | </context> | ||
224 | 227 | | |||
225 | </contexts> | 228 | </contexts> | ||
226 | 229 | | |||
227 | <itemDatas> | 230 | <itemDatas> | ||
228 | <itemData name = "Normal" defStyleNum = "dsNormal" /> | 231 | <itemData name = "Normal" defStyleNum = "dsNormal" /> | ||
229 | <itemData name = "Directive" defStyleNum = "dsKeyword" /> | 232 | <itemData name = "Directive" defStyleNum = "dsKeyword" /> | ||
230 | <itemData name = "Built-in" defStyleNum = "dsFunction" /> | 233 | <itemData name = "Built-in" defStyleNum = "dsFunction" /> | ||
231 | <itemData name = "Operator" defStyleNum = "dsDataType" /> | 234 | <itemData name = "Operator" defStyleNum = "dsDataType" /> | ||
232 | <itemData name = "Comment" defStyleNum = "dsComment" /> | 235 | <itemData name = "Comment" defStyleNum = "dsComment" /> | ||
233 | <itemData name = "Number" defStyleNum = "dsDecVal" /> | 236 | <itemData name = "Number" defStyleNum = "dsDecVal" /> | ||
234 | <itemData name = "String" defStyleNum = "dsString" /> | 237 | <itemData name = "String" defStyleNum = "dsString" /> | ||
238 | <itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false"/> | ||||
235 | <itemData name = "Variable" defStyleNum = "dsOthers" /> | 239 | <itemData name = "Variable" defStyleNum = "dsOthers" /> | ||
236 | </itemDatas> | 240 | </itemDatas> | ||
237 | 241 | | |||
238 | </highlighting> | 242 | </highlighting> | ||
239 | 243 | | |||
240 | <general> | 244 | <general> | ||
241 | <comments> | 245 | <comments> | ||
242 | <comment name = "singleLine" start = "%" /> | 246 | <comment name = "singleLine" start = "%" /> | ||
243 | <comment name = "multiLine" start = "/*" end = "*/" region = "Comment" /> | 247 | <comment name = "multiLine" start = "/*" end = "*/" region = "Comment" /> | ||
244 | </comments> | 248 | </comments> | ||
245 | <keywords casesensitive="true" /> | 249 | <keywords casesensitive="true" /> | ||
246 | </general> | 250 | </general> | ||
247 | 251 | | |||
248 | </language> | 252 | </language> |