prolog.jsf (2560B)
1 # JOE syntax highlight file for Prolog 2 # by Christian Nicolai (http://mycrobase.de) 3 4 =Idle 5 =Ident 6 =Comment 7 =String +Constant 8 =Number +Constant 9 =Escape 10 =StringEscape +Escape 11 =Keyword 12 =Bad 13 14 =Brace 15 =Variable 16 =Predicate +DefinedFunction +DefinedIdent 17 18 :idle Idle 19 * idle 20 "\n" idle 21 "%" line_comment recolor=-1 22 "/" maybe_comment 23 "0-9" first_digit recolor=-1 24 "'" string_sq_1 recolor=-1 25 "\"" string_dq_1 recolor=-1 26 27 # marking -> predicate hilite 28 # buffering -> keyword hilite 29 "a-z" atom mark buffer 30 31 "A-Z" variable recolor=-1 32 "_" _variable 33 "[]" brace recolor=-1 34 35 :line_comment Comment comment 36 * line_comment 37 "BFHNTX" line_comment noeat call=comment_todo.comment_todo() 38 "\n" idle 39 40 :maybe_comment Idle 41 * idle noeat 42 "*" comment recolor=-2 43 44 :comment Comment comment 45 * comment 46 "*" maybe_end_comment 47 "BFHNTX" comment noeat call=comment_todo.comment_todo() 48 49 :maybe_end_comment Comment comment 50 * comment noeat 51 "/" idle 52 "*" maybe_end_comment 53 54 :brace Brace 55 * idle noeat 56 57 :string_sq_1 String string 58 * string_sq noeat 59 60 :string_sq String string 61 * string_sq 62 "\'" idle 63 "\\" string_sq_esc recolor=-1 64 65 :string_sq_esc StringEscape string 66 * string_sq 67 "\n" string_sq recolor=-2 68 69 :string_dq_1 String string 70 * string_dq noeat 71 72 :string_dq String string 73 * string_dq 74 "\"" idle 75 "\\" string_dq_esc recolor=-1 76 77 :string_dq_esc StringEscape string 78 * string_dq 79 "\n" string_dq recolor=-2 80 81 :first_digit Number 82 * idle noeat 83 # no float support 84 # "." float 85 "0-9" first_number 86 87 :first_number Number 88 * idle noeat 89 "0-9" first_number 90 "." float 91 92 :float Number 93 * idle noeat 94 "eE" epart 95 "0-9" float 96 97 :epart Number 98 * idle noeat 99 "0-9+\-" enum 100 101 :enum Number 102 * idle noeat 103 "0-9" enum 104 105 # list of keywords includes some predicates... 106 :atom Ident 107 * atom_end noeat markend strings 108 "append" kw 109 "atom" kw 110 "atomic" kw 111 "call" kw 112 "catch" kw 113 "clause" kw 114 "close" kw 115 "fail" kw 116 "findall" kw 117 "float" kw 118 "halt" kw 119 "integer" kw 120 "is" kw 121 "member" kw 122 "nl" kw 123 "nonvar" kw 124 "number" kw 125 "once" kw 126 "op" kw 127 "open" kw 128 "read" kw 129 "repeat" kw 130 "throw" kw 131 "true" kw 132 "var" kw 133 "write" kw 134 done 135 "a-zA-Z0-9_" atom 136 137 :kw Keyword 138 * idle noeat 139 140 :atom_end Idle 141 * idle noeat 142 " " atom_end 143 "(" pred_end recolormark 144 ":" maybe_pred_end 145 146 :pred_end Predicate 147 * idle noeat 148 149 :maybe_pred_end Idle 150 * idle noeat 151 "-" pred_end recolormark 152 153 :variable Variable 154 * idle noeat 155 "a-zA-Z0-9_" variable 156 157 :_variable Idle 158 * idle noeat 159 # if it's not only _, color it 160 "a-zA-Z0-9_" variable recolor=-2