1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
|
# JOE syntax highlight file for Progress 4GL
# by Gediminas http://proc.w3.lt
# Version 1.04
=Idle
=Comment
=Constant
=String +Constant
=Number +Constant
=Type
=Ident
# conditional operators, blocks
=Keyword
=Conditional +Keyword
=Operator +Keyword
# preprocessor include, definition, reference
=Preproc
=Include +Preproc
=PreRef +Ident
:idle Idle
* idle
"/" slash
"{" brace
"&" prep buffer
"a-zA-Z" ident buffer
"'" string recolor=-1
"\"" string2 recolor=-1
"0-9" number recolor=-1
"?" question recolor=-1
# Comments - 2 levels of nesting allowed
:slash Idle
* idle noeat
"*" comment recolor=-2
:comment Comment comment
* comment
"/" slash2
"*" maybe_end_comment
"BFHNTX" comment noeat call=comment_todo.comment_todo()
:maybe_end_comment Comment comment
* comment
"/" idle
"*" maybe_end_comment
:slash2 Idle
* comment noeat
"*" comment2 recolor=-2
:comment2 Comment comment
* comment2
"*" maybe_end_comment2
"BFHNTX" comment2 noeat call=comment_todo.comment_todo()
:maybe_end_comment2 Comment comment
* comment2
"/" comment
"*" maybe_end_comment2
# Preprocessor
# Allow preprocessor name reference inside include file reference:
# {include/trace {&FILE-NAME} {&LINE-NUMBER}}
:brace Include
* include noeat
"&" scoped recolor=-2
"}" idle
:include Include
* include recolor=-2
"{" brace2
"}" idle
:brace2 Include
* include2 noeat
"}" idle
:include2 Include
* include2 recolor=-2
"}" include
:scoped PreRef
* scoped
"}" idle
:prep Preproc
* idle noeat istrings
"&IF" predir
"&THEN" predir
"&ELSEIF" predir
"&ELSE" predir
"&ENDIF" predir
"&SCOPED-DEFINE" predir
"&SCOP" predir
"&GLOBAL-DEFINE" predir
"&GLOB" predir
"&MESSAGE" predir
"&UNDEFINE" predir
"&UNDEF" predir
done
"-a-zA-Z0-9_" prep
:predir Preproc
* idle noeat
# String constants, copied from pascal.jsf with " added
:string String string
* string
"\n" idle
"'" maybe_end_string
:maybe_end_string String string
* idle recolor=-1 noeat
"'" string
:string2 String string
* string2
"\n" idle
"\"" maybe_end_string2
:maybe_end_string2 String string
* idle recolor=-1 noeat
"\"" string2
# Numeric constant, same as pascal.jsf
:number Number
* idle noeat
"0-9" number
"eE" epart
"." dot
:dot Number
* idle noeat
"0-9" float
:float Number
* idle noeat
"eE" epart
"0-9" float
:epart Number
* idle noeat
"0-9+\-" enum
:enum Number
* idle noeat
"0-9" enum
:question Constant
* idle noeat
# Keywords
# Available jumps: cond type oper kw
# TODO: This needs to be vastly expanded, it seems like every other
# token in this language is a keyword.
:ident Ident
* idle noeat istrings
"assign" cond
"case" cond
"cha" type
"char" type
"character" type
"create" reserved
"dat" type
"date" type
"dec" type
"decimal" type
"defined" oper
"delete" reserved
"do" reserved
"else" cond
"end" cond
"find" reserved
"for" reserved
"function" cond
"get" reserved
"handle" type
"if" cond
"int" type
"integer" type
"leave" cond
"log" type
"logical" type
"memptr" type
"next" cond
"otherwise" cond
"param" cond
"parameter" cond
"procedure" cond
"raw" type
"rec" type
"repeat" cond
"reposition" reserved
"return" cond
"rowid" type
"run" cond
"then" cond
"when" cond
"widget-handle" type
done
"-a-zA-Z0-9_" ident
:cond Conditional
* idle noeat
:type Type
* idle noeat
:oper Operator
* idle noeat
:reserved Keyword
* idle noeat
|