2005-05-24 00:33:41 +01:00
/**
** Logtalk syntax dictionary for TextMate.
**
** Paulo Moura <pmoura@logtalk.org>
**/
2004-10-17 23:37:16 +01:00
{
2005-12-24 18:00:21 +00:00
name = "Logtalk";
2005-05-24 00:33:41 +01:00
scopeName = "source.logtalk";
fileTypes = (lgt, config);
2005-12-24 18:00:21 +00:00
foldingStartMarker = "(/\\*|:-\\s+(object|protocol|category)(?=[(]))";
foldingStopMarker = "(\\*/|:-\\s+end_(object|protocol|category)(?=[.]))";
2005-05-24 00:33:41 +01:00
patterns = (
2005-12-24 18:00:21 +00:00
{ name = "comment.block.logtalk";
begin = "/\\*"; end = "\\*/";
2005-05-24 00:33:41 +01:00
},
2005-12-24 18:00:21 +00:00
{ name = "comment.line.percentage.logtalk";
2005-05-24 00:33:41 +01:00
match = "%.*$";
},
2005-12-24 18:00:21 +00:00
{ name = "storage.type.opening.logtalk";
match = ":-\\s+(object|protocol|category|module)(?=[(])";
2005-05-24 00:33:41 +01:00
},
{
2005-12-24 18:00:21 +00:00
name = "storage.type.closing.logtalk";
match = ":-\\s+(end_(object|protocol|category))(?=[.])";
2005-05-24 00:33:41 +01:00
},
2005-12-24 18:00:21 +00:00
{ name = "storage.type.relations.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(extends|i(nstantiates|mp(orts|lements))|specializes)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "storage.modifier.others.logtalk";
match = ":-\\s+(calls|e(ncoding|xport)|in(itialization|fo)|uses)(?=[(])";
2005-05-24 00:33:41 +01:00
},
2005-12-24 18:00:21 +00:00
{ name = "storage.modifier.others.logtalk";
match = ":-\\s+(alias|info|d(ynamic|iscontiguous)|m(etapredicate|ode|ultifile)|p(ublic|r(otected|ivate))|op|use(s|_module))(?=[(])";
2005-05-24 00:33:41 +01:00
},
2005-12-24 18:00:21 +00:00
{ name = "keyword.operator.message-sending.logtalk";
2005-05-24 00:33:41 +01:00
match = "(::|\\^\\^)";
},
2005-12-24 18:00:21 +00:00
{ name = "keyword.operator.mode.logtalk";
2005-05-24 00:33:41 +01:00
match = "(\\?|@)";
},
2005-12-24 18:00:21 +00:00
{ name = "keyword.operator.term-comparison.logtalk";
2005-05-24 00:33:41 +01:00
match = "(@=<|@<|@>|@>=|==|\\\\==)";
},
2005-12-24 18:00:21 +00:00
{ name = "keyword.operator.arithmetic-comparison.logtalk";
2005-05-24 00:33:41 +01:00
match = "(=<|<|>|>=|=:=|=\\\\=)";
},
2005-12-24 18:00:21 +00:00
{ name = "keyword.operator.bitwise.logtalk";
2005-05-24 00:33:41 +01:00
match = "(<<|>>|/\\\\|\\\\/|\\\\)";
},
2005-12-24 18:00:21 +00:00
{ name = "keyword.operator.evaluable.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(mod|rem)\\b";
},
2005-12-24 18:00:21 +00:00
{ name = "keyword.operator.evaluable.logtalk";
2005-05-24 00:33:41 +01:00
match = "(\\*\\*|\\+|-|\\*|/|//)";
},
2005-12-24 18:00:21 +00:00
{ name = "keyword.operator.misc.logtalk";
2005-05-24 00:33:41 +01:00
match = "(:-|!|\\\\+|,|;|-->|->|=|\\=|\\.|=\\.\\.|\\bis\\b)";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.control.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(true|fail|repeat)\\b";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.control.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(ca(ll|tch)|throw|once)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.chars-and-bytes-io.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b((get|peek|put)_(char|code|byte)|nl)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.chars-and-bytes-io.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\bnl\\b";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.atom-term-processing.logtalk";
match = "\\b(atom_(length|c(hars|o(ncat|des)))|sub_atom|char_code|number_c(hars|odes))(?=[(])";
2005-05-24 00:33:41 +01:00
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.term-testing.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(var|atom|integer|float|atomic|compound|n(onvar|umber))(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.term-io.logtalk";
match = "\\b(read_term|read|write|write(q|_(canonical|term))|op|current_op|char_conversion|current_char_conversion)(?=[(])";
2005-05-24 00:33:41 +01:00
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.term-creation-and-decomposition.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(arg|copy_term|functor)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.term-unification.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(unify_with_occurs_check)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.stream-selection-and-control.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b((set|current)_(in|out)put|open|close|flush_output|stream_property|at_end_of_stream|set_stream_position)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.stream-selection-and-control.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(flush_output|at_end_of_stream)\\b";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.prolog-flags.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b((set|current)_prolog_flag)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.compiling-and-loading.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(logtalk_(compile|l(ibrary_path|oad)))(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.event-handling.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b((abolish|define)_events|current_event)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.implementation-defined-hooks.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b((current|set)_logtalk_flag|halt)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.implementation-defined-hooks.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(halt)\\b";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.entity-creation-and-abolishing.logtalk";
match = "\\b((c(reate|urrent)|abolish)_(object|protocol|category))(?=[(])";
2005-05-24 00:33:41 +01:00
},
2005-12-24 18:00:21 +00:00
{ name = "keyword.other.predicate.reflection.logtalk";
match = "\\b((object|protocol|category)_property|extends_(object|protocol)|imp(orts_category|lements_protocol)|(instantiates|specializes)_class)(?=[(])";
2005-05-24 00:33:41 +01:00
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b((for|retract)all)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.execution-context.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(parameter|se(lf|nder)|this)(?=[(])";
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.database.logtalk";
match = "\\b(a(bolish|ssert(a|z))|clause|retract|retractall)(?=[(])";
2005-05-24 00:33:41 +01:00
},
2005-12-24 18:00:21 +00:00
{ name = "support.function.all-solutions.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b((bag|set)of|f(ind|or)all)(?=[(])";
2005-12-24 18:00:21 +00:00
},
{ name = "support.function.reflection.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(current_predicate|predicate_property)(?=[(])";
2005-12-24 18:00:21 +00:00
},
{ name = "support.function.event-handler.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(before|after)(?=[(])";
2005-12-24 18:00:21 +00:00
},
{ name = "support.function.grammar-rule.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b(expand_term|phrase)(?=[(])";
2005-12-24 18:00:21 +00:00
},
{ name = "string.quoted.single.logtalk";
begin = "'"; end = "'"; swallow = "\\\\.";
},
{ name = "string.quoted.double.logtalk";
begin = "\""; end = "\""; swallow = "\\\\.";
},
{ name = "constant.numeric.logtalk";
match = "\\b(0b[0-1]+|0o[0-7]+|0x\\h+)\\b";
},
{ name = "constant.numeric.logtalk";
match = "\\b(0'.|0''|0'\")";
},
{ name = "constant.numeric.logtalk";
match = "\\b(\\d+\\.?\\d*((e|E)(\\+|-)?\\d+)?)\\b";
},
{ name = "variable.other.logtalk";
2005-05-24 00:33:41 +01:00
match = "\\b([A-Z_][A-Za-z0-9_]*)\\b";
}
);
uuid = "C11FA1F2-6EDB-11D9-8798-000A95DAA580";
2004-10-17 23:37:16 +01:00
}