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="2" kateversion="2.4" section="Sources" extensions="*.lgt;*.config" mimetype="text/x-logtalk" author="Paulo Moura (pmoura@logtalk.org)" license="Artistic License 2.0"> | 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"> | ||
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" /> | ||
13 | <!-- Event handlers --> | 13 | <!-- Event handlers --> | ||
14 | <RegExpr String = "\b(after|before)(?=[(])" attribute = "Built-in" context = "#stay" /> | 14 | <RegExpr String = "\b(after|before)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
15 | <!-- Message forwarding handler --> | ||||
16 | <RegExpr String = "\bforward(?=[(])" attribute = "Built-in" context = "#stay" /> | ||||
15 | <!-- Method execution context --> | 17 | <!-- Method execution context --> | ||
16 | <RegExpr String = "\b(parameter|this|se(lf|nder))(?=[(])" attribute = "Built-in" context = "#stay" /> | 18 | <RegExpr String = "\b(context|parameter|this|se(lf|nder))(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
17 | <!-- Reflection --> | 19 | <!-- Reflection --> | ||
18 | <RegExpr String = "\b(current_predicate|predicate_property)(?=[(])" attribute = "Built-in" context = "#stay" /> | 20 | <RegExpr String = "\b(current_predicate|predicate_property)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
19 | <!-- DCGs --> | 21 | <!-- DCGs --> | ||
20 | <RegExpr String = "\b(expand_term|term_expansion|phrase)(?=[(])" attribute = "Built-in" context = "#stay" /> | 22 | <RegExpr String = "\b(expand_(goal|term)|(goal|term)_expansion|phrase)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
21 | <!-- Entity --> | 23 | <!-- Entity --> | ||
22 | <RegExpr String = "\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])" attribute = "Built-in" context = "#stay" /> | 24 | <RegExpr String = "\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
23 | <RegExpr String = "\b(object|protocol|category)_property(?=[(])" attribute = "Built-in" context = "#stay" /> | 25 | <RegExpr String = "\b(object|protocol|category)_property(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
24 | <!-- Entity relations --> | 26 | <!-- Entity relations --> | ||
25 | <RegExpr String = "\bextends_(object|protocol)(?=[(])" attribute = "Built-in" context = "#stay" /> | 27 | <RegExpr String = "\bco(mplements_object|nforms_to_protocol)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
26 | <RegExpr String = "\bimplements_protocol(?=[(])" attribute = "Built-in" context = "#stay" /> | 28 | <RegExpr String = "\bextends_(object|protocol|category)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
27 | <RegExpr String = "\b(instantiates|specializes)_class(?=[(])" attribute = "Built-in" context = "#stay" /> | 29 | <RegExpr String = "\bimp(lements_protocol|orts_category)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
28 | <RegExpr String = "\bimports_category(?=[(])" attribute = "Built-in" context = "#stay" /> | 30 | <RegExpr String = "\b(instantiat|specializ)es_class(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
29 | <!-- Events --> | 31 | <!-- Events --> | ||
30 | <RegExpr String = "\b(current_event|(abolish|define)_events)(?=[(])" attribute = "Built-in" context = "#stay" /> | 32 | <RegExpr String = "\b(current_event|(abolish|define)_events)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
31 | <!-- Flags --> | 33 | <!-- Flags --> | ||
32 | <RegExpr String = "\b(current|set)_logtalk_flag(?=[(])" attribute = "Built-in" context = "#stay" /> | 34 | <RegExpr String = "\b(create|current|set)_logtalk_flag(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
33 | <!-- Compiling, loading, and library paths --> | 35 | <!-- Compiling, loading, and library paths --> | ||
34 | <RegExpr String = "\blogtalk_(compile|l(ibrary_path|oad))(?=[(])" attribute = "Built-in" context = "#stay" /> | 36 | <RegExpr String = "\blogtalk_(compile|l(ibrary_path|oad|oad_context)|make(_target_action)?)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
37 | <RegExpr String = "\blogtalk_make\b" attribute = "Built-in" context = "#stay" /> | ||||
35 | <!-- Database --> | 38 | <!-- Database --> | ||
36 | <RegExpr String = "\b(clause|retract(all)?)(?=[(])" attribute = "Built-in" context = "#stay" /> | 39 | <RegExpr String = "\b(clause|retract(all)?)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
37 | <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" /> | ||
38 | <!-- Control --> | 41 | <!-- Control --> | ||
39 | <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" /> | ||
40 | <RegExpr String = "\b(fail|true)\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" /> | ||||
41 | <!-- All solutions --> | 45 | <!-- All solutions --> | ||
42 | <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 --> | ||||
48 | <RegExpr String = "\bthreaded(_(call|once|ignore|exit|peek|wait|notify))?(?=[(])" attribute = "Built-in" context = "#stay" /> | ||||
49 | <!-- Engine predicates --> | ||||
50 | <RegExpr String = "\bthreaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?(?=[(])" attribute = "Built-in" context = "#stay" /> | ||||
43 | <!-- Term unification --> | 51 | <!-- Term unification --> | ||
44 | <RegExpr String = "\bunify_with_occurs_check(?=[(])" attribute = "Built-in" context = "#stay" /> | 52 | <RegExpr String = "\b(subsumes_term|unify_with_occurs_check)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
45 | <!-- Term creation and decomposition --> | 53 | <!-- Term creation and decomposition --> | ||
46 | <RegExpr String = "\b(functor|arg|copy_term)(?=[(])" attribute = "Built-in" context = "#stay" /> | 54 | <RegExpr String = "\b(functor|arg|copy_term|numbervars|term_variables)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
47 | <!-- Evaluable functors --> | 55 | <!-- Evaluable functors --> | ||
48 | <RegExpr String = "\b(rem|mod|abs|sign)(?=[(])" attribute = "Built-in" context = "#stay" /> | 56 | <RegExpr String = "\b(div|rem|m(ax|in|od)|abs|sign)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
49 | <RegExpr String = "\bfloat(_(integer|fractional)_part)?(?=[(])" attribute = "Built-in" context = "#stay" /> | 57 | <RegExpr String = "\bfloat(_(integer|fractional)_part)?(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
50 | <RegExpr String = "\b(floor|truncate|round|ceiling)(?=[(])" attribute = "Built-in" context = "#stay" /> | 58 | <RegExpr String = "\b(floor|truncate|round|ceiling)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
51 | <!-- Other arithmetic functors --> | 59 | <!-- Other arithmetic functors --> | ||
52 | <RegExpr String = "\b(cos|atan|exp|log|s(in|qrt))(?=[(])" attribute = "Built-in" context = "#stay" /> | 60 | <RegExpr String = "\b(cos|a(cos|sin|tan|tan2)|exp|log|s(in|qrt)|tan|xor)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
53 | <!-- Term testing --> | 61 | <!-- Term testing --> | ||
54 | <RegExpr String = "\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])" attribute = "Built-in" context = "#stay" /> | 62 | <RegExpr String = "\b(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|ground|acyclic_term)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
63 | <!-- Term comparison --> | ||||
64 | <RegExpr String = "\bcompare(?=[(])" attribute = "Built-in" context = "#stay" /> | ||||
55 | <!-- Stream selection and control --> | 65 | <!-- Stream selection and control --> | ||
56 | <RegExpr String = "\b(current|set)_(in|out)put(?=[(])" attribute = "Built-in" context = "#stay" /> | 66 | <RegExpr String = "\b(curren|se)t_(in|out)put(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
57 | <RegExpr String = "\b(open|close)(?=[(])" attribute = "Built-in" context = "#stay" /> | 67 | <RegExpr String = "\b(open|close)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
58 | <RegExpr String = "\bflush_output(?=[(])" attribute = "Built-in" context = "#stay" /> | 68 | <RegExpr String = "\bflush_output(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
59 | <RegExpr String = "\bflush_output\b" attribute = "Built-in" context = "#stay" /> | 69 | <RegExpr String = "\b(at_end_of_stream|flush_output)\b" attribute = "Built-in" context = "#stay" /> | ||
60 | <RegExpr String = "\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])" attribute = "Built-in" context = "#stay" /> | 70 | <RegExpr String = "\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
61 | <!-- Character and byte input/output --> | 71 | <!-- Character and byte input/output --> | ||
62 | <RegExpr String = "\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])" attribute = "Built-in" context = "#stay" /> | 72 | <RegExpr String = "\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
63 | <RegExpr String = "\bnl\b" attribute = "Built-in" context = "#stay" /> | 73 | <RegExpr String = "\bnl\b" attribute = "Built-in" context = "#stay" /> | ||
64 | <!-- Term input/output --> | 74 | <!-- Term input/output --> | ||
65 | <RegExpr String = "\bread(_term)?(?=[(])" attribute = "Built-in" context = "#stay" /> | 75 | <RegExpr String = "\bread(_term)?(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
66 | <RegExpr String = "\bwrite(q|_(canonical|term))?(?=[(])" attribute = "Built-in" context = "#stay" /> | 76 | <RegExpr String = "\bwrite(q|_(canonical|term))?(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
67 | <RegExpr String = "\b(current_)?op(?=[(])" attribute = "Built-in" context = "#stay" /> | 77 | <RegExpr String = "\b(current_)?op(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
68 | <RegExpr String = "\b(current_)?char_conversion(?=[(])" attribute = "Built-in" context = "#stay" /> | 78 | <RegExpr String = "\b(current_)?char_conversion(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
69 | <!-- Atomic term processing --> | 79 | <!-- Atomic term processing --> | ||
70 | <RegExpr String = "\batom_(length|c(hars|o(ncat|des)))(?=[(])" attribute = "Built-in" context = "#stay" /> | 80 | <RegExpr String = "\batom_(length|c(hars|o(ncat|des)))(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
71 | <RegExpr String = "\b(char_code|sub_atom)(?=[(])" attribute = "Built-in" context = "#stay" /> | 81 | <RegExpr String = "\b(char_code|sub_atom)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
72 | <RegExpr String = "\bnumber_c(hars|odes)(?=[(])" attribute = "Built-in" context = "#stay" /> | 82 | <RegExpr String = "\bnumber_c(har|ode)s(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
73 | <!-- Implementation defined hooks functions --> | 83 | <!-- Implementation defined hooks functions --> | ||
74 | <RegExpr String = "\b(set|current)_prolog_flag(?=[(])" attribute = "Built-in" context = "#stay" /> | 84 | <RegExpr String = "\b(se|curren)t_prolog_flag(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
75 | <RegExpr String = "\bhalt\b" attribute = "Built-in" context = "#stay" /> | 85 | <RegExpr String = "\bhalt\b" attribute = "Built-in" context = "#stay" /> | ||
76 | <RegExpr String = "\bhalt(?=[(])" attribute = "Built-in" context = "#stay" /> | 86 | <RegExpr String = "\bhalt(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
87 | <!-- Sorting --> | ||||
88 | <RegExpr String = "\b(key)?sort(?=[(])" attribute = "Built-in" context = "#stay" /> | ||||
77 | <!-- Variables --> | 89 | <!-- Variables --> | ||
78 | <RegExpr String = "\b[A-Z_]\w*" attribute = "Variable" context = "#stay" /> | 90 | <RegExpr String = "\b[A-Z_]\w*" attribute = "Variable" context = "#stay" /> | ||
79 | <!-- Comments --> | 91 | <!-- Comments --> | ||
80 | <DetectChar char = "%" attribute = "Comment" context = "single line comment" /> | 92 | <DetectChar char = "%" attribute = "Comment" context = "single line comment" /> | ||
81 | <Detect2Chars char = "/" char1 = "*" attribute = "Comment" context = "multiline comment" beginRegion = "Comment" /> | 93 | <Detect2Chars char = "/" char1 = "*" attribute = "Comment" context = "multiline comment" beginRegion = "Comment" /> | ||
82 | <!-- Strings and quoted atoms --> | 94 | <!-- Strings and quoted atoms --> | ||
83 | <DetectChar char = """ attribute = "String" context = "string" /> | 95 | <DetectChar char = """ attribute = "String" context = "string" /> | ||
84 | <DetectChar char = "'" attribute = "String" context = "atom" /> | 96 | <DetectChar char = "'" attribute = "String" context = "atom" /> | ||
85 | <!-- Numbers --> | 97 | <!-- Numbers --> | ||
98 | <RegExpr String = "0'\\." attribute = "Number" context = "#stay" /> | ||||
86 | <RegExpr String = "0'." attribute = "Number" context = "#stay" /> | 99 | <RegExpr String = "0'." attribute = "Number" context = "#stay" /> | ||
87 | <RegExpr String = "0b[0-1]+" attribute = "Number" context = "#stay" /> | 100 | <RegExpr String = "0b[0-1]+" attribute = "Number" context = "#stay" /> | ||
88 | <RegExpr String = "0o[0-7]+" attribute = "Number" context = "#stay" /> | 101 | <RegExpr String = "0o[0-7]+" attribute = "Number" context = "#stay" /> | ||
89 | <RegExpr String = "0x[0-9a-fA-F]+" attribute = "Number" context = "#stay" /> | 102 | <RegExpr String = "0x[0-9a-fA-F]+" attribute = "Number" context = "#stay" /> | ||
90 | <RegExpr String = "\d+(\.\d+)?([eE]([-+])?\d+)?" attribute = "Number" context = "#stay" /> | 103 | <RegExpr String = "\d+(\.\d+)?([eE]([-+])?\d+)?" attribute = "Number" context = "#stay" /> | ||
91 | <!-- Message sending operators --> | 104 | <!-- Message sending operators --> | ||
92 | <Detect2Chars char = ":" char1 = ":" attribute = "Operator" context = "#stay" /> | 105 | <Detect2Chars char = ":" char1 = ":" attribute = "Operator" context = "#stay" /> | ||
93 | <Detect2Chars char = "^" char1 = "^" attribute = "Operator" context = "#stay" /> | 106 | <Detect2Chars char = "^" char1 = "^" attribute = "Operator" context = "#stay" /> | ||
94 | <!-- External call --> | 107 | <!-- External call --> | ||
95 | <DetectChar char = "{" attribute = "Operator" context = "#stay" beginRegion="external" /> | 108 | <DetectChar char = "{" attribute = "Operator" context = "#stay" beginRegion="external" /> | ||
96 | <DetectChar char = "}" attribute = "Operator" context = "#stay" endRegion="external" /> | 109 | <DetectChar char = "}" attribute = "Operator" context = "#stay" endRegion="external" /> | ||
97 | <!-- Logic and control --> | 110 | <!-- Logic and control --> | ||
98 | <RegExpr String = "\bonce(?=[(])" attribute = "Built-in" context = "#stay" /> | 111 | <RegExpr String = "\b(ignore|once)(?=[(])" attribute = "Built-in" context = "#stay" /> | ||
99 | <RegExpr String = "\brepeat\b" attribute = "Built-in" context = "#stay" /> | 112 | <RegExpr String = "\brepeat\b" attribute = "Built-in" context = "#stay" /> | ||
100 | <!-- Bitwise functors --> | 113 | <!-- Bitwise functors --> | ||
101 | <Detect2Chars char = ">" char1 = ">" attribute = "Operator" context = "#stay" /> | 114 | <Detect2Chars char = ">" char1 = ">" attribute = "Operator" context = "#stay" /> | ||
102 | <Detect2Chars char = "<" char1 = "<" attribute = "Operator" context = "#stay" /> | 115 | <Detect2Chars char = "<" char1 = "<" attribute = "Operator" context = "#stay" /> | ||
103 | <Detect2Chars char = "/" char1 = "\" attribute = "Operator" context = "#stay" /> | 116 | <Detect2Chars char = "/" char1 = "\" attribute = "Operator" context = "#stay" /> | ||
104 | <Detect2Chars char = "\" char1 = "/" attribute = "Operator" context = "#stay" /> | 117 | <Detect2Chars char = "\" char1 = "/" attribute = "Operator" context = "#stay" /> | ||
105 | <Detect2Chars char = "\" char1 = "\" attribute = "Operator" context = "#stay" /> | 118 | <Detect2Chars char = "\" char1 = "\" attribute = "Operator" context = "#stay" /> | ||
106 | <!-- Arithemtic evaluation --> | 119 | <!-- Predicate aliases --> | ||
120 | <RegExpr String = "\bas\b" attribute = "Operator" context = "#stay" /> | ||||
121 | <!-- Arithmetic evaluation --> | ||||
107 | <RegExpr String = "\bis\b" attribute = "Operator" context = "#stay" /> | 122 | <RegExpr String = "\bis\b" attribute = "Operator" context = "#stay" /> | ||
108 | <!-- Arithemtic comparison --> | 123 | <!-- Arithmetic comparison --> | ||
109 | <StringDetect String = "=:=" attribute = "Operator" context = "#stay" /> | 124 | <StringDetect String = "=:=" attribute = "Operator" context = "#stay" /> | ||
110 | <StringDetect String = "=\=" attribute = "Operator" context = "#stay" /> | 125 | <StringDetect String = "=\=" attribute = "Operator" context = "#stay" /> | ||
111 | <DetectChar char = "<" attribute = "Operator" context = "#stay" /> | 126 | <DetectChar char = "<" attribute = "Operator" context = "#stay" /> | ||
112 | <Detect2Chars char = "=" char1 = "<" attribute = "Operator" context = "#stay" /> | 127 | <Detect2Chars char = "=" char1 = "<" attribute = "Operator" context = "#stay" /> | ||
113 | <DetectChar char = ">" attribute = "Operator" context = "#stay" /> | 128 | <DetectChar char = ">" attribute = "Operator" context = "#stay" /> | ||
114 | <Detect2Chars char = ">" char1 = "=" attribute = "Operator" context = "#stay" /> | 129 | <Detect2Chars char = ">" char1 = "=" attribute = "Operator" context = "#stay" /> | ||
115 | <!-- Term creation and decomposition --> | 130 | <!-- Term creation and decomposition --> | ||
116 | <StringDetect String = "=.." attribute = "Operator" context = "#stay" /> | 131 | <StringDetect String = "=.." attribute = "Operator" context = "#stay" /> | ||
117 | <!-- Term unification --> | 132 | <!-- Term unification --> | ||
118 | <DetectChar char = "=" attribute = "Operator" context = "#stay" /> | 133 | <DetectChar char = "=" attribute = "Operator" context = "#stay" /> | ||
119 | <Detect2Chars char = "\" char1 = "=" attribute = "Operator" context = "#stay" /> | 134 | <Detect2Chars char = "\" char1 = "=" attribute = "Operator" context = "#stay" /> | ||
120 | <!-- Term comparison --> | 135 | <!-- Term comparison --> | ||
121 | <Detect2Chars char = "=" char1 = "=" attribute = "Operator" context = "#stay" /> | 136 | <Detect2Chars char = "=" char1 = "=" attribute = "Operator" context = "#stay" /> | ||
122 | <StringDetect String = "\==" attribute = "Operator" context = "#stay" /> | 137 | <StringDetect String = "\==" attribute = "Operator" context = "#stay" /> | ||
123 | <StringDetect String = "@=<" attribute = "Operator" context = "#stay" /> | 138 | <StringDetect String = "@=<" attribute = "Operator" context = "#stay" /> | ||
124 | <Detect2Chars char = "@" char1 = "<" attribute = "Operator" context = "#stay" /> | 139 | <Detect2Chars char = "@" char1 = "<" attribute = "Operator" context = "#stay" /> | ||
125 | <StringDetect String = "@>=" attribute = "Operator" context = "#stay" /> | 140 | <StringDetect String = "@>=" attribute = "Operator" context = "#stay" /> | ||
126 | <Detect2Chars char = "@" char1 = ">" attribute = "Operator" context = "#stay" /> | 141 | <Detect2Chars char = "@" char1 = ">" attribute = "Operator" context = "#stay" /> | ||
127 | <!-- Evaluable functors --> | 142 | <!-- Evaluable functors --> | ||
128 | <Detect2Chars char = "/" char1 = "/" attribute = "Operator" context = "#stay" /> | 143 | <Detect2Chars char = "/" char1 = "/" attribute = "Operator" context = "#stay" /> | ||
129 | <AnyChar String = "+-*/" attribute = "Operator" context = "#stay" /> | 144 | <AnyChar String = "+-*/" attribute = "Operator" context = "#stay" /> | ||
130 | <RegExpr String = "\b(mod|rem)\b" attribute = "Operator" context = "#stay" /> | 145 | <RegExpr String = "\b(e|pi|div|mod|rem)\b" attribute = "Operator" context = "#stay" /> | ||
131 | <!-- Other arithemtic functors --> | 146 | <!-- Other arithemtic functors --> | ||
132 | <Detect2Chars char = "*" char1 = "*" attribute = "Operator" context = "#stay" /> | 147 | <Detect2Chars char = "*" char1 = "*" attribute = "Operator" context = "#stay" /> | ||
133 | <!-- DCG rules --> | 148 | <!-- DCG rules --> | ||
134 | <StringDetect String = "-->" attribute = "Operator" context = "#stay" /> | 149 | <StringDetect String = "-->" attribute = "Operator" context = "#stay" /> | ||
135 | <!-- Control constructs --> | 150 | <!-- Control constructs --> | ||
136 | <AnyChar String = "!;" attribute = "Operator" context = "#stay" /> | 151 | <AnyChar String = "!;" attribute = "Operator" context = "#stay" /> | ||
137 | <Detect2Chars char = "-" char1 = ">" attribute = "Operator" context = "#stay" /> | 152 | <Detect2Chars char = "-" char1 = ">" attribute = "Operator" context = "#stay" /> | ||
138 | <!-- Logic and control --> | 153 | <!-- Logic and control --> | ||
139 | <Detect2Chars char = "\" char1 = "+" attribute = "Operator" context = "#stay" /> | 154 | <Detect2Chars char = "\" char1 = "+" attribute = "Operator" context = "#stay" /> | ||
140 | <!-- Mode operators --> | 155 | <!-- Mode operators --> | ||
141 | <AnyChar String = "?@" attribute = "Operator" context = "#stay" /> | 156 | <AnyChar String = "?@" attribute = "Operator" context = "#stay" /> | ||
157 | <!-- Category predicate direct call operator --> | ||||
158 | <AnyChar String = ":" attribute = "Operator" context = "#stay" /> | ||||
142 | <!-- Clause operator --> | 159 | <!-- Clause operator --> | ||
143 | <Detect2Chars char = ":" char1 = "-" firstNonSpace = "false" attribute = "Normal" context = "#stay" /> | 160 | <Detect2Chars char = ":" char1 = "-" firstNonSpace = "false" attribute = "Normal" context = "#stay" /> | ||
161 | <!-- Existential quantifier --> | ||||
162 | <AnyChar String = "^" attribute = "Operator" context = "#stay" /> | ||||
144 | <!-- Atoms --> | 163 | <!-- Atoms --> | ||
145 | <RegExpr String = "\b[a-z]\w*" attribute = "Normal" context = "#stay" /> | 164 | <RegExpr String = "\b[a-z]\w*" attribute = "Normal" context = "#stay" /> | ||
146 | </context> | 165 | </context> | ||
147 | 166 | | |||
148 | <context name = "directive" attribute = "Directive" lineEndContext = "#stay" > | 167 | <context name = "directive" attribute = "Directive" lineEndContext = "#stay" > | ||
168 | <!-- Conditional compilation directives --> | ||||
169 | <RegExpr String = "\bif(?=[(])" attribute = "Directive" context = "#pop" beginRegion = "CC" /> | ||||
170 | <RegExpr String = "\bendif[.]" attribute = "Directive" context = "#pop" endRegion = "CC" /> | ||||
171 | <RegExpr String = "\belif(?=[(])" attribute = "Directive" context = "#pop"/> | ||||
172 | <RegExpr String = "\belse[.]" attribute = "Directive" context = "#pop" /> | ||||
149 | <!-- Entity directives --> | 173 | <!-- Entity directives --> | ||
150 | <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" /> | ||
151 | <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" /> | ||
152 | <RegExpr String = "\bmodule(?=[(])" attribute = "Directive" context = "#pop"/> | 176 | <RegExpr String = "\bmodule(?=[(])" attribute = "Directive" context = "#pop"/> | ||
153 | <!-- Predicate scope directives --> | 177 | <!-- Predicate scope directives --> | ||
154 | <RegExpr String = "\bp(ublic|r(otected|ivate))(?=[(])" attribute = "Directive" context = "#pop" /> | 178 | <RegExpr String = "\bp(ublic|r(otected|ivate))(?=[(])" attribute = "Directive" context = "#pop" /> | ||
155 | <!-- Other directives --> | 179 | <!-- Other directives --> | ||
156 | <RegExpr String = "\be(ncoding|xport)(?=[(])" attribute = "Directive" context = "#pop" /> | 180 | <RegExpr String = "\be(n(coding|sure_loaded)|xport)(?=[(])" attribute = "Directive" context = "#pop" /> | ||
157 | <RegExpr String = "\bin(fo|itialization)(?=[(])" attribute = "Directive" context = "#pop" /> | 181 | <RegExpr String = "\bin(clude|itialization|fo)(?=[(])" attribute = "Directive" context = "#pop" /> | ||
158 | <RegExpr String = "\bdynamic[.]" attribute = "Directive" context = "#pop" /> | 182 | <RegExpr String = "\b(built_in|dynamic|synchronized|threaded)[.]" attribute = "Directive" context = "#pop" /> | ||
159 | <RegExpr String = "\b(alias|d(ynamic|iscontiguous)|meta_predicate|m(etapredicate|ode|ultifile))(?=[(])" 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" /> | ||
160 | <RegExpr String = "\bop(?=[(])" attribute = "Directive" context = "#pop" /> | 184 | <RegExpr String = "\bop(?=[(])" attribute = "Directive" context = "#pop" /> | ||
161 | <RegExpr String = "\b(calls|use(s|_module))(?=[(])" attribute = "Directive" context = "#pop" /> | 185 | <RegExpr String = "\b(c(alls|oinductive)|reexport|use(s|_module))(?=[(])" attribute = "Directive" context = "#pop" /> | ||
162 | </context> | 186 | </context> | ||
163 | 187 | | |||
164 | <context name = "entityrelations" attribute = "Normal" lineEndContext = "#stay" > | 188 | <context name = "entityrelations" attribute = "Normal" lineEndContext = "#stay" > | ||
165 | <RegExpr String = "\b(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 --> | ||||
191 | <RegExpr String = "\b[A-Z_]\w*" attribute = "Variable" context = "#stay" /> | ||||
192 | <!-- Comments --> | ||||
193 | <DetectChar char = "%" attribute = "Comment" context = "single line comment" /> | ||||
194 | <Detect2Chars char = "/" char1 = "*" attribute = "Comment" context = "multiline comment" beginRegion = "Comment" /> | ||||
195 | <!-- Strings and quoted atoms --> | ||||
196 | <DetectChar char = """ attribute = "String" context = "string" /> | ||||
197 | <DetectChar char = "'" attribute = "String" context = "atom" /> | ||||
198 | <!-- Numbers --> | ||||
199 | <RegExpr String = "0'\\." attribute = "Number" context = "#stay" /> | ||||
200 | <RegExpr String = "0'." attribute = "Number" context = "#stay" /> | ||||
201 | <RegExpr String = "0b[0-1]+" attribute = "Number" context = "#stay" /> | ||||
202 | <RegExpr String = "0o[0-7]+" attribute = "Number" context = "#stay" /> | ||||
203 | <RegExpr String = "0x[0-9a-fA-F]+" attribute = "Number" context = "#stay" /> | ||||
204 | <RegExpr String = "\d+(\.\d+)?([eE]([-+])?\d+)?" attribute = "Number" context = "#stay" /> | ||||
205 | <!-- Scope operator --> | ||||
206 | <Detect2Chars char = ":" char1 = ":" attribute = "Operator" context = "#stay" /> | ||||
207 | <!-- End of entity-opening directive --> | ||||
166 | <Detect2Chars attribute = "Normal" context = "normal" char = ")" char1 = "." /> | 208 | <Detect2Chars attribute = "Normal" context = "normal" char = ")" char1 = "." /> | ||
167 | </context> | 209 | </context> | ||
168 | 210 | | |||
169 | <context name = "single line comment" attribute = "Comment" lineEndContext = "#pop" /> | 211 | <context name = "single line comment" attribute = "Comment" lineEndContext = "#pop" /> | ||
170 | 212 | | |||
171 | <context name = "multiline comment" attribute = "Comment" lineEndContext = "#stay" > | 213 | <context name = "multiline comment" attribute = "Comment" lineEndContext = "#stay" > | ||
172 | <Detect2Chars char = "*" char1 = "/" attribute = "Comment" context = "#pop" endRegion = "Comment" /> | 214 | <Detect2Chars char = "*" char1 = "/" attribute = "Comment" context = "#pop" endRegion = "Comment" /> | ||
173 | </context> | 215 | </context> | ||
174 | 216 | | |||
175 | <context name = "string" attribute = "String" lineEndContext = "#stay" > | 217 | <context name = "string" attribute = "String" lineEndContext = "#stay" > | ||
176 | <DetectChar char = """ attribute = "String" context = "#pop" /> | 218 | <DetectChar char = """ attribute = "String" context = "#pop" /> | ||
177 | </context> | 219 | </context> | ||
178 | 220 | | |||
179 | <context name = "atom" attribute = "String" lineEndContext = "#stay" > | 221 | <context name = "atom" attribute = "String" lineEndContext = "#stay" > | ||
180 | <DetectChar char = "'" attribute = "String" context = "#pop" /> | 222 | <DetectChar char = "'" attribute = "String" context = "#pop" /> | ||
181 | </context> | 223 | </context> | ||
182 | 224 | | |||
183 | </contexts> | 225 | </contexts> | ||
184 | 226 | | |||
185 | <itemDatas> | 227 | <itemDatas> | ||
186 | <itemData name = "Normal" defStyleNum = "dsNormal" /> | 228 | <itemData name = "Normal" defStyleNum = "dsNormal" /> | ||
187 | <itemData name = "Directive" defStyleNum = "dsKeyword" /> | 229 | <itemData name = "Directive" defStyleNum = "dsKeyword" /> | ||
188 | <itemData name = "Built-in" defStyleNum = "dsKeyword" /> | 230 | <itemData name = "Built-in" defStyleNum = "dsFunction" /> | ||
189 | <itemData name = "Operator" defStyleNum = "dsDataType" /> | 231 | <itemData name = "Operator" defStyleNum = "dsDataType" /> | ||
190 | <itemData name = "Comment" defStyleNum = "dsComment" /> | 232 | <itemData name = "Comment" defStyleNum = "dsComment" /> | ||
191 | <itemData name = "Number" defStyleNum = "dsDecVal" /> | 233 | <itemData name = "Number" defStyleNum = "dsDecVal" /> | ||
192 | <itemData name = "String" defStyleNum = "dsString" /> | 234 | <itemData name = "String" defStyleNum = "dsString" /> | ||
193 | <itemData name = "Variable" defStyleNum = "dsOthers" /> | 235 | <itemData name = "Variable" defStyleNum = "dsOthers" /> | ||
194 | </itemDatas> | 236 | </itemDatas> | ||
195 | 237 | | |||
196 | </highlighting> | 238 | </highlighting> | ||
Show All 10 Lines |