forked from CWempe/openhab-mcedit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenhab-rules.syntax
196 lines (174 loc) · 7.37 KB
/
openhab-rules.syntax
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
# Syntax highlighting for rules files of openHAB in mcedit
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_01234567890
# default colors
define color_command white
define color_vartype cyan
define color_rule brightred
define color_trigger brightcyan
define color_event brightred
define color_timer red
define color_system brightred
define color_string brightgreen
define color_option green
define color_option_quote brightgreen
define color_parameter yellow
define color_comment brown
define color_function white
context default
# Commands
keyword whole import color_command
keyword whole var color_command
keyword whole val color_command
keyword whole say color_command
keyword whole if color_command
keyword whole else color_command
keyword whole while color_command
keyword whole switch color_command
keyword whole println color_command
keyword whole case color_command
keyword whole or color_command
keyword whole default color_command
keyword whole postUpdate color_command
keyword whole sendCommand color_command
keyword whole createTimer color_command
keyword whole sendTelegram color_command
keyword whole sendTweet color_command
keyword whole sendMail color_command
keyword whole notifyMyAndroid color_command
keyword whole logWarn color_command
keyword whole logDebug color_command
keyword whole logInfo color_command
keyword whole logMessage color_command
keyword whole startTime color_command
keyword whole endTime color_command
keyword whole callScript color_command
keyword whole Thread color_command
keyword whole sleep color_command
keyword whole state color_command
keyword whole executeCommandLine color_command
# VarTypes
keyword whole DateTimeType color_vartype
keyword whole Number color_vartype
keyword whole String color_vartype
keyword whole Timer color_vartype
keyword whole float color_vartype
keyword whole int color_vartype
keyword whole long color_vartype
# Rules
keyword whole rule color_rule
keyword whole when color_rule
keyword whole then color_rule
keyword whole end color_rule
# Trigger
keyword whole Item color_trigger
keyword whole Thing color_trigger
keyword whole Time color_trigger
keyword whole System color_trigger
# Events
keyword whole received color_event
keyword whole command color_event
keyword whole update color_event
keyword whole changed color_event
keyword whole from color_event
keyword whole to color_event
# Timer
keyword whole cron color_timer
keyword whole is color_timer
# System
keyword whole started color_system
keyword whole shuts color_system
keyword whole down color_system
# Parameters
keyword whole name color_parameter
keyword whole label color_parameter
keyword whole item color_parameter
keyword whole period color_parameter
keyword whole refresh color_parameter
keyword whole icon color_parameter
keyword whole mappings color_parameter
keyword whole minValue color_parameter
keyword whole maxValue color_parameter
keyword whole step color_parameter
keyword whole switchsupport color_parameter
keyword whole url color_parameter
keyword whole hight color_parameter
keyword whole playStream color_parameter
keyword whole setMasterVolume color_parameter
keyword whole increaseMasterVolume color_parameter
keyword whole decreaseMasterVolume color_parameter
# Numbers
keyword \{0123456789\} color_vartype
keyword NULL color_vartype
keyword UNDEF color_vartype
keyword ON color_vartype
keyword OFF color_vartype
keyword OPEN color_vartype
keyword CLOSED color_vartype
keyword OFF color_vartype
# Operators
keyword -> color_parameter
keyword => color_parameter
keyword > color_parameter
keyword < color_parameter
keyword \+ color_parameter
keyword - color_parameter
keyword \* color_parameter
keyword / color_parameter
keyword = color_parameter
keyword != color_parameter
keyword == color_parameter
keyword && color_parameter
keyword || color_parameter
keyword ! color_parameter
keyword whole as color_parameter
keyword "*" color_option_quote
keyword whole import color_command
keyword whole var color_command
keyword whole say color_command
keyword whole if color_command
keyword whole else color_command
keyword whole postUpdate color_command
keyword whole switch color_command
keyword whole println color_command
keyword whole case color_command
# Functions
keyword whole zonedDateTime color_function
keyword whole getStateAs color_function
keyword whole now color_function
keyword whole parse color_function
keyword whole toString color_function
keyword whole substring color_function
keyword whole until color_function
keyword whole getMinute color_function
keyword whole getHour color_function
keyword whole getDayOfMonth color_function
keyword whole historicState color_function
keyword whole lastUpdate color_function
keyword whole averageSince color_function
keyword whole deltaBetween color_function
keyword whole deltaSince color_function
keyword whole maximumBetween color_function
keyword whole maximumSince color_function
keyword whole minimumBetween color_function
keyword whole minimumSince color_function
keyword whole minusSeconds color_function
keyword whole minusMinutes color_function
keyword whole minusHours color_function
keyword whole minusDays color_function
keyword whole minusWeeks color_function
keyword whole minusMonths color_function
keyword whole minusYears color_function
keyword whole plusSeconds color_function
keyword whole plusMinutes color_function
keyword whole plusHours color_function
keyword whole plusDays color_function
keyword whole plusWeeks color_function
keyword whole plusMonths color_function
keyword whole plusYears color_function
# Comments
context exclusive /\* \*/ color_comment
spellcheck
context exclusive // \n color_comment
spellcheck
# Strings
context " " color_string