Warning, /frameworks/syntax-highlighting/data/syntax/logtalk.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language [
0003   <!ENTITY event_handlers "after|before">
0004   <!ENTITY message_forwarding_handler "forward">
0005   <!ENTITY method_execution_context "context|parameter|this|se(lf|nder)">
0006   <!ENTITY reflection "current_predicate|predicate_property">
0007   <!ENTITY dcgs "expand_(goal|term)|(goal|term)_expansion|phrase">
0008   <!ENTITY entity1 "(abolish|c(reate|urrent))_(object|protocol|category)">
0009   <!ENTITY entity2 "(object|protocol|category)_property">
0010   <!ENTITY entity_relations "co(mplements_object|nforms_to_protocol)|extends_(object|protocol|category)|imp(lements_protocol|orts_category)|(instantiat|specializ)es_class">
0011   <!ENTITY events "current_event|(abolish|define)_events">
0012   <!ENTITY flags "(create|current|set)_logtalk_flag">
0013   <!ENTITY compiling_loading_and_library_paths "logtalk_(compile|l(ibrary_path|oad|oad_context)|make(_target_action)?)">
0014   <!ENTITY database "clause|retract(all)?|a(bolish|ssert(a|z))">
0015   <!ENTITY control "ca(ll|tch)|throw|(type|domain|existence|permission|representation|evaluation|resource|syntax)_error">
0016   <!ENTITY all_solutions "(bag|set)of|f(ind|or)all">
0017   <!ENTITY multi_threading_predicates "threaded(_(ca(ll|ncel)|once|ignore|exit|peek|wait|notify))?">
0018   <!ENTITY engine_predicates "threaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?">
0019   <!ENTITY term_unification "subsumes_term|unify_with_occurs_check">
0020   <!ENTITY term_creation_and_decomposition "functor|arg|copy_term|numbervars|term_variables">
0021   <!ENTITY evaluable_functors "div|rem|m(ax|in|od)|abs|sign|float(_(integer|fractional)_part)?|floor|truncate|round|ceiling">
0022   <!ENTITY other_arithmetic_functors "cos|a(cos|sin|tan|tan2)|exp|log|s(in|qrt)|tan|xor">
0023   <!ENTITY term_testing "var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|ground|acyclic_term">
0024   <!ENTITY term_comparison "compare">
0025   <!ENTITY stream_selection_and_control "(curren|se)t_(in|out)put|open|close|flush_output|stream_property|at_end_of_stream|set_stream_position">
0026   <!ENTITY character_and_byte_input_output "nl|(get|peek|put)_(byte|c(har|ode))">
0027   <!ENTITY term_input_output "read(_term)?|write(q|_(canonical|term))?|(current_)?op|(current_)?char_conversion">
0028   <!ENTITY atomic_term_processing "atom_(length|c(hars|o(ncat|des)))|char_code|sub_atom|number_c(har|ode)s">
0029   <!ENTITY implementation_defined_hooks_functions "(se|curren)t_prolog_flag|halt">
0030   <!ENTITY sorting "(key)?sort">
0031   <!ENTITY logic_and_control "ignore|once">
0032 ]>
0033 
0034 <language name="Logtalk" version="8" kateversion="5.0" section="Sources" extensions="*.lgt;.logtalk" mimetype="text/x-logtalk" author="Paulo Moura (pmoura@logtalk.org)" license="Apache License 2.0">
0035 
0036         <highlighting>
0037 
0038                 <contexts>
0039 
0040                         <context name = "normal" attribute = "Normal" lineEndContext = "#stay" >
0041                                 <!-- Directives -->
0042                                 <RegExpr String = "^\s*:-" attribute = "Normal" context = "directive" column="0" />
0043                                 <RegExpr String = "\b(&event_handlers;|&message_forwarding_handler;|&method_execution_context;|&reflection;|&dcgs;|&entity1;|&entity2;|&entity_relations;|&events;|&flags;|&compiling_loading_and_library_paths;|&database;|&control;|&all_solutions;|&multi_threading_predicates;|&engine_predicates;|&term_unification;|&term_creation_and_decomposition;|&evaluable_functors;|&other_arithmetic_functors;|&term_testing;|&term_comparison;|&stream_selection_and_control;|&character_and_byte_input_output;|&term_input_output;|&atomic_term_processing;|&implementation_defined_hooks_functions;|&sorting;|&logic_and_control;)(?=[(])|\b(logtalk_make|fa(il|lse)|true|(instantiation|system)_error|at_end_of_stream|flush_output|nl|halt|repeat)\b" attribute = "Built-in" context = "#stay" />
0044                                 <!-- Variables -->
0045                                 <RegExpr String = "\b[A-Z_]\w*" attribute = "Variable" context = "#stay" />
0046                                 <!-- Comments -->
0047                                 <DetectChar char = "%" attribute = "Comment" context = "single line comment" />
0048                                 <Detect2Chars char = "/" char1 = "*" attribute = "Comment" context = "multiline comment" beginRegion = "Comment" />
0049                                 <!-- Strings and quoted atoms -->
0050                                 <DetectChar char = "&quot;" attribute = "String" context = "string" />
0051                                 <DetectChar char = "'" attribute = "String" context = "atom" />
0052                                 <!-- Numbers -->
0053                                 <RegExpr String = "0'\\?.|0b[0-1]+|0o[0-7]+|0x[0-9a-fA-F]+|\d+(\.\d+)?([eE]([-+])?\d+)?" attribute = "Number" context = "#stay" />
0054                                 <!-- Message sending operators -->
0055                                 <Detect2Chars char = ":" char1 = ":" attribute = "Operator" context = "#stay" />
0056                                 <Detect2Chars char = "^" char1 = "^" attribute = "Operator" context = "#stay" />
0057                                 <!-- External call -->
0058                                 <DetectChar char = "{" attribute = "Operator" context = "#stay" beginRegion="external" />
0059                                 <DetectChar char = "}" attribute = "Operator" context = "#stay" endRegion="external" />
0060                                 <!-- Bitwise functors -->
0061                                 <Detect2Chars char = "&gt;" char1 = "&gt;" attribute = "Operator" context = "#stay" />
0062                                 <Detect2Chars char = "&lt;" char1 = "&lt;" attribute = "Operator" context = "#stay" />
0063                                 <Detect2Chars char = "/" char1 = "\" attribute = "Operator" context = "#stay" />
0064                                 <Detect2Chars char = "\" char1 = "/" attribute = "Operator" context = "#stay" />
0065                                 <Detect2Chars char = "\" char1 = "\" attribute = "Operator" context = "#stay" />
0066                                 <!-- Predicate aliases -->
0067                                 <!-- Arithmetic evaluation -->
0068                                 <RegExpr String = "\b[ai]s\b" attribute = "Operator" context = "#stay" />
0069                                 <!-- Arithmetic comparison -->
0070                                 <StringDetect String = "=:=" attribute = "Operator" context = "#stay" />
0071                                 <StringDetect String = "=\=" attribute = "Operator" context = "#stay" />
0072                                 <DetectChar char = "&lt;" attribute = "Operator" context = "#stay" />
0073                                 <Detect2Chars char = "=" char1 = "&lt;" attribute = "Operator" context = "#stay" />
0074                                 <Detect2Chars char = "&gt;" char1 = "=" attribute = "Operator" context = "#stay" />
0075                                 <DetectChar char = "&gt;" attribute = "Operator" context = "#stay" />
0076                                 <!-- Term creation and decomposition -->
0077                                 <StringDetect String = "=.." attribute = "Operator" context = "#stay" />
0078                                 <!-- Term comparison -->
0079                                 <Detect2Chars char = "=" char1 = "=" attribute = "Operator" context = "#stay" />
0080                                 <StringDetect String = "\==" attribute = "Operator" context = "#stay" />
0081                                 <StringDetect String = "@=&lt;" attribute = "Operator" context = "#stay" />
0082                                 <Detect2Chars char = "@" char1 = "&lt;" attribute = "Operator" context = "#stay" />
0083                                 <StringDetect String = "@&gt;=" attribute = "Operator" context = "#stay" />
0084                                 <Detect2Chars char = "@" char1 = "&gt;" attribute = "Operator" context = "#stay" />
0085                                 <!-- Term unification -->
0086                                 <DetectChar char = "=" attribute = "Operator" context = "#stay" />
0087                                 <Detect2Chars char = "\" char1 = "=" attribute = "Operator" context = "#stay" />
0088                                 <!-- DCG rules -->
0089                                 <StringDetect String = "--&gt;" attribute = "Operator" context = "#stay" />
0090                                 <!-- Control constructs -->
0091                                 <AnyChar String = "!;" attribute = "Operator" context = "#stay" />
0092                                 <Detect2Chars char = "-" char1 = "&gt;" attribute = "Operator" context = "#stay" />
0093                                 <!-- Other arithemtic functors -->
0094                                 <Detect2Chars char = "*" char1 = "*" attribute = "Operator" context = "#stay" />
0095                                 <!-- Evaluable functors -->
0096                                 <Detect2Chars char = "/" char1 = "/" attribute = "Operator" context = "#stay" />
0097                                 <AnyChar String = "+-*/" attribute = "Operator" context = "#stay" />
0098                                 <RegExpr String = "\b(e|pi|div|mod|rem)\b" attribute = "Operator" context = "#stay" />
0099                                 <!-- Logic and control -->
0100                                 <Detect2Chars char = "\" char1 = "+" attribute = "Operator" context = "#stay" />
0101                                 <!-- Mode operators -->
0102                                 <!-- Category predicate direct call operator -->
0103                                 <!-- Existential quantifier -->
0104                                 <AnyChar String = "?@:^" attribute = "Operator" context = "#stay" />
0105                                 <!-- Atoms -->
0106                                 <RegExpr String = "\b[a-z]\w*" attribute = "Normal" context = "#stay" />
0107                         </context>
0108 
0109                         <context name = "directive" attribute = "Directive" lineEndContext = "#stay" >
0110                                 <!-- Conditional compilation directives -->
0111                                 <RegExpr String = "\bif(?=[(])" attribute = "Directive" context = "#pop" beginRegion = "CC" />
0112                                 <RegExpr String = "\bendif(?=[.])" attribute = "Directive" context = "#pop" endRegion = "CC" />
0113                                 <RegExpr String = "\belif(?=[(])|\belse(?=[.])" attribute = "Directive" context = "#pop" />
0114                                 <!-- Entity directives -->
0115                                 <RegExpr String = "\b(category|object|protocol)(?=[(])" attribute = "Directive" context = "entityrelations" beginRegion = "Entity" />
0116                                 <RegExpr String = "\bend_(category|object|protocol)(?=[.])" attribute = "Directive" context = "#pop" endRegion = "Entity" />
0117                                 <!-- Predicate scope directives -->
0118                                 <!-- Other directives -->
0119                                 <RegExpr String = "\bmodule(?=[(])|\bp(ublic|r(otected|ivate))(?=[(])|\be(n(coding|sure_loaded)|xport)(?=[(])|\bin(clude|itialization|fo)(?=[(])|\b(built_in|dynamic|synchronized|threaded)(?=[.])|\b(alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])|\bop(?=[(])|\b(c(alls|oinductive)|reexport|use(s|_module))(?=[(])" attribute = "Directive" context = "#pop" />
0120                         </context>
0121 
0122                         <context name = "entityrelations" attribute = "Normal" lineEndContext = "#stay" >
0123                                 <RegExpr String = "\b(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])" attribute = "Directive" context = "#stay" />
0124                                 <!-- Variables -->
0125                                 <RegExpr String = "\b[A-Z_]\w*" attribute = "Variable" context = "#stay" />
0126                                 <!-- Comments -->
0127                                 <DetectChar char = "%" attribute = "Comment" context = "single line comment" />
0128                                 <Detect2Chars char = "/" char1 = "*" attribute = "Comment" context = "multiline comment" beginRegion = "Comment" />
0129                                 <!-- Strings and quoted atoms -->
0130                                 <DetectChar char = "&quot;" attribute = "String" context = "string" />
0131                                 <DetectChar char = "'" attribute = "String" context = "atom" />
0132                                 <!-- Numbers -->
0133                                 <RegExpr String = "0'\\?.|0b[0-1]+|0o[0-7]+|0x[0-9a-fA-F]+|\d+(\.\d+)?([eE]([-+])?\d+)?" attribute = "Number" context = "#stay" />
0134                                 <!-- Scope operator -->
0135                                 <Detect2Chars char = ":" char1 = ":" attribute = "Operator" context = "#stay" />
0136                                 <!-- End of entity-opening directive -->
0137                                 <Detect2Chars attribute = "Normal" context = "normal" char = ")" char1 = "." />
0138                         </context>
0139 
0140                         <context name = "single line comment" attribute = "Comment" lineEndContext = "#pop">
0141                                 <DetectSpaces />
0142                                 <IncludeRules context="##Comments" />
0143                         </context>
0144 
0145                         <context name = "multiline comment" attribute = "Comment" lineEndContext = "#stay" >
0146                                 <Detect2Chars char = "*" char1 = "/" attribute = "Comment" context = "#pop" endRegion = "Comment" />
0147                                 <DetectSpaces />
0148                                 <IncludeRules context="##Comments" />
0149                         </context>
0150 
0151                         <context name = "string" attribute = "String" lineEndContext = "#stay" >
0152                                 <DetectChar char = "&quot;" attribute = "String" context = "#pop" />
0153                         </context>
0154 
0155                         <context name = "atom" attribute = "String" lineEndContext = "#stay" >
0156                                 <RegExpr attribute="String Char" context="#stay" String="\\x[a-fA-F0-9]+\\|\\[0-7]+\\"/>
0157                                 <HlCStringChar attribute="String Char" context="#stay"/>
0158                                 <DetectChar char = "'" attribute = "String" context = "#pop" />
0159                         </context>
0160 
0161                 </contexts>
0162 
0163                 <itemDatas>
0164                         <itemData name = "Normal" defStyleNum = "dsNormal" />
0165                         <itemData name = "Directive" defStyleNum = "dsKeyword" />
0166                         <itemData name = "Built-in" defStyleNum = "dsFunction" />
0167                         <itemData name = "Operator" defStyleNum = "dsDataType" />
0168                         <itemData name = "Comment" defStyleNum = "dsComment" />
0169                         <itemData name = "Number" defStyleNum = "dsDecVal" />
0170                         <itemData name = "String" defStyleNum = "dsString" />
0171                         <itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false"/>
0172                         <itemData name = "Variable" defStyleNum = "dsOthers" />
0173                 </itemDatas>
0174 
0175         </highlighting>
0176 
0177         <general>
0178                 <comments>
0179                         <comment name = "singleLine" start = "%" position = "afterwhitespace" />
0180                         <comment name = "multiLine" start = "/*" end = "*/" region = "Comment" />
0181                 </comments>
0182                 <keywords casesensitive="true" />
0183         </general>
0184 
0185 </language>
0186 <!-- kate: replace-tabs off; -->