# highlighting for Logtalk source files (http://logtalk.org/) # # written by Paulo Moura (pmoura@logtalk.org) # last revised on January 18, 2011 comment start "%" comment delim "/*" "*/" multiline nested string delim "\"" "\"" escape "\\" environment string delim "'" "'" begin specialchar = '\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)' end keyword = '\<(abolish|c(urrent|reate))_(object|protocol|category)(?=\()', '\<(object|protocol|category)_property(?=\()', '\', '\<(stream_property|at_end_of_stream|set_stream_position)(?=\()', '\<(get|p(eek|ut))_(byte|c(har|ode))(?=\()', '\', '\<(read(_term)?)(?=\()', '\<(write(q|_(canonical|term))?)(?=\()', '\<(op|current_op)(?=\()', '\<((current_)?char_conversion)(?=\()', '\', '\<(ignore|once)(?=\()', '\<((key)?sort)(?=\()', '\<(true|fail|repeat)\>', '\<(e|pi|is|rem|mod)\>' variable = '\<[A-Z_][A-Za-z0-9_]*' cbracket = "{|}" preproc = '^[[:blank:]]*:-[[:blank:]](c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(fo|itialization))|alias|d(ynamic|iscontiguous)|m(eta_predicate|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))(?=\()', '^[[:blank:]]*:-[[:blank:]](e(lse|nd(if|_(category|object|protocol)))|dynamic|synchronized|threaded)\.' preproc = '\<(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=\()' normal = '\<[a-z][A-Za-z0-9_]*' number = '0\'.|0b[0-1]+|0o[0-7]+|0x[0-9a-fA-F]+|[0-9]+(\.[0-9]+)?([eE]([-+])?[0-9]+)?' symbol = "^", "::", "^^", ":", ">>", "<<", "/\\", "\\/", "\\", "=:=", "=\\=", "<", "=<", ">", ">=", "=..", "\\==", "==", "@=<", "@<", "@>=", "@>", "=", "\\=", "+", "-", "**", "*", "//", "/", "-->", "!", "->", ";", "\\+", "?", "@", ":-"