1
0
mirror of https://github.com/cmur2/joe-syntax.git synced 2024-06-26 10:34:40 +02:00
joe-syntax/prolog.jsf

138 lines
2.0 KiB
Plaintext
Raw Normal View History

# JOE syntax highlight file for Prolog
=Idle
=Comment green
=Constant cyan
=Escape bold cyan
=Variable cyan
=Keyword bold
=Bad bold red
# since lists are important...
=Brace magenta
:idle Idle
* idle
"\n" idle
"%" line_comment recolor=-1
"/" maybe_comment
"0-9" first_digit recolor=-1
"'" string_sq_1 recolor=-1
2011-08-01 11:21:59 +02:00
"\"" string_dq_1 recolor=-1
"a-z" atom buffer
"A-Z" variable recolor=-1
"_" _variable
2011-08-01 11:21:59 +02:00
"[]" brace recolor=-1
:line_comment Comment
* line_comment
2011-08-01 11:21:59 +02:00
"\n" idle
:maybe_comment Idle
2011-08-01 11:21:59 +02:00
* idle noeat
"*" comment recolor=-2
:comment Comment
* comment
"*" maybe_end_comment
:maybe_end_comment Comment
* comment
"/" idle
"*" maybe_end_comment
:brace Brace
2011-08-01 11:21:59 +02:00
* idle noeat
:string_sq_1 Constant
* string_sq noeat
:string_sq Constant
* string_sq
"\'" idle
"\\" string_sq_esc recolor=-1
:string_sq_esc Escape
* string_sq
"\n" string_sq recolor=-2
:string_dq_1 Constant
* string_dq noeat
:string_dq Constant
* string_dq
"\"" idle
"\\" string_dq_esc recolor=-1
:string_dq_esc Escape
* string_dq
"\n" string_dq recolor=-2
:first_digit Constant
2011-08-01 11:21:59 +02:00
* idle noeat
# no float support
# "." float
"0-9" first_number
:first_number Constant
2011-08-01 11:21:59 +02:00
* idle noeat
"0-9" first_number
"." float
:float Constant
2011-08-01 11:21:59 +02:00
* idle noeat
"eE" epart
"0-9" float
:epart Constant
2011-08-01 11:21:59 +02:00
* idle noeat
"0-9+\-" enum
:enum Constant
2011-08-01 11:21:59 +02:00
* idle noeat
"0-9" enum
# list of keywords includes some predicates...
:atom Idle
2011-08-01 11:21:59 +02:00
* idle noeat strings
"append" kw
"atom" kw
"atomic" kw
"call" kw
"catch" kw
"clause" kw
"close" kw
"fail" kw
"findall" kw
"float" kw
"halt" kw
"integer" kw
"is" kw
"member" kw
"nl" kw
"nonvar" kw
"number" kw
"once" kw
"op" kw
"open" kw
"read" kw
"repeat" kw
"throw" kw
"true" kw
"var" kw
"write" kw
done
"a-zA-Z0-9_" atom
:kw Keyword
2011-08-01 11:21:59 +02:00
* idle noeat
:variable Variable
2011-08-01 11:21:59 +02:00
* idle noeat
"a-zA-Z0-9_" variable
:_variable Idle
2011-08-01 11:21:59 +02:00
* idle noeat
# if it's not only _, color it
"a-zA-Z0-9_" variable recolor=-2