... | ... |
@@ -289,10 +289,10 @@ |
289 | 289 |
<StringDetect attribute="Director Property" context="backend_declaration" String=".backend" /> |
290 | 290 |
<DetectChar attribute="Region Marker" context="#pop" char="}" endRegion="director_backend_block" /> |
291 | 291 |
</context> |
292 |
- <context name="acl_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
292 |
+ <context name="acl_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
293 | 293 |
<DetectChar attribute="Region Marker" context="acl_definition" char="{" beginRegion="acl_block" /> |
294 | 294 |
</context> |
295 |
- <context name="acl_definition" attribute="Normal Text" lineEndContext="#stay"> |
|
295 |
+ <context name="acl_definition" attribute="Normal Text" lineEndContext="#stay"> |
|
296 | 296 |
<IncludeRules context="minimal_code" /> |
297 | 297 |
<DetectChar attribute="Logical Operator" context="#stay" char="!" /> |
298 | 298 |
<DetectChar attribute="Logical Operator" context="#stay" char="/" /> |
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<!DOCTYPE language SYSTEM "language.dtd"> |
3 |
-<language name="Varnish 4 Configuration Language" version="0.1" kateversion="2.4" section="Configuration" extensions="*.vcl;" mimetype="" author="Xavier Guerrin (xavier@tuxfamily.org)" license="WTFPL" priority="4"> |
|
3 |
+<language name="Varnish 4 Configuration Language" version="0.1" kateversion="3.4" section="Configuration" extensions="*.vcl;" mimetype="" author="Xavier Guerrin (xavier@tuxfamily.org)" license="WTFPL" priority="4"> |
|
4 | 4 |
<highlighting> |
5 | 5 |
<list name="vclStandardSubs"> |
6 | 6 |
<item>vcl_recv</item> |
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<!DOCTYPE language SYSTEM "language.dtd"> |
3 |
-<language name="Varnish4 Configuration Language" version="0.1" kateversion="2.4" section="Configuration" extensions="*.vcl;" mimetype="" author="Xavier Guerrin (xavier@tuxfamily.org)" license="WTFPL" priority="4"> |
|
3 |
+<language name="Varnish 4 Configuration Language" version="0.1" kateversion="2.4" section="Configuration" extensions="*.vcl;" mimetype="" author="Xavier Guerrin (xavier@tuxfamily.org)" license="WTFPL" priority="4"> |
|
4 | 4 |
<highlighting> |
5 | 5 |
<list name="vclStandardSubs"> |
6 | 6 |
<item>vcl_recv</item> |
... | ... |
@@ -100,14 +100,14 @@ |
100 | 100 |
<contexts> |
101 | 101 |
<context name="normal_text" attribute="Normal Text" lineEndContext="#stay"> |
102 | 102 |
<IncludeRules context="comments" /> |
103 |
- <RegExpr attribute="Keyword" context="sub_declaration" String="^\s*sub\s+" /> |
|
104 |
- <RegExpr attribute="Keyword" context="probe_declaration" String="^\s*probe\s+" /> |
|
105 |
- <RegExpr attribute="Keyword" context="backend_declaration" String="^\s*backend\s+" /> |
|
106 |
- <RegExpr attribute="Keyword" context="director_declaration" String="^\s*director\s+" /> |
|
107 |
- <RegExpr attribute="Keyword" context="acl_declaration" String="^\s*acl\s+" /> |
|
108 |
- <RegExpr attribute="Keyword" context="import_declaration" String="^\s*import\s+" /> |
|
109 |
- <RegExpr attribute="Keyword" context="include_declaration" String="^\s*include\s+" /> |
|
110 |
- <RegExpr attribute="Keyword" context="version_declaration" String="^\s*vcl\s+" /> |
|
103 |
+ <StringDetect attribute="Keyword" context="sub_declaration" String="sub" /> |
|
104 |
+ <StringDetect attribute="Keyword" context="probe_declaration" String="probe" /> |
|
105 |
+ <StringDetect attribute="Keyword" context="backend_declaration" String="backend" /> |
|
106 |
+ <StringDetect attribute="Keyword" context="director_declaration" String="director" /> |
|
107 |
+ <StringDetect attribute="Keyword" context="acl_declaration" String="acl" /> |
|
108 |
+ <StringDetect attribute="Keyword" context="import_declaration" String="import" /> |
|
109 |
+ <StringDetect attribute="Keyword" context="include_declaration" String="include" /> |
|
110 |
+ <StringDetect attribute="Keyword" context="version_declaration" String="vcl" /> |
|
111 | 111 |
<IncludeRules context="embedded-c" /> |
112 | 112 |
</context> |
113 | 113 |
<context name="embedded-c" attribute="Normal Text" lineEndContext="#stay"> |
... | ... |
@@ -215,10 +215,7 @@ |
215 | 215 |
<DetectChar attribute="Normal Text" char=";" context="#pop" /> |
216 | 216 |
</context> |
217 | 217 |
<context name="return_synth" attribute="Normal Text" lineEndContext="#stay"> |
218 |
- <IncludeRules context="comments" /> |
|
219 |
- <Int attribute="Decimal" context="#stay" /> |
|
220 |
- <DetectChar char=""" context="string" attribute="String" /> |
|
221 |
- <Detect2Chars attribute="String" char="{" char1=""" context="string_enclosure" beginRegion="string_enclosure_block" /> |
|
218 |
+ <IncludeRules context="basic_code" /> |
|
222 | 219 |
<DetectChar attribute="Normal Text" char=")" context="#pop" /> |
223 | 220 |
</context> |
224 | 221 |
<context name="string_enclosure" attribute="String" lineEndContext="#stay"> |
... | ... |
@@ -183,6 +183,7 @@ |
183 | 183 |
<StringDetect attribute="Keyword" context="#stay" String="true" /> |
184 | 184 |
<StringDetect attribute="Keyword" context="#stay" String="false" /> |
185 | 185 |
<RegExpr attribute="Known VMod Function" context="#stay" String="debug\.(panic|author|obj|test_priv_(?:call|vcl)|str2blob|blob2hex|no_backend|rot52)" /> |
186 |
+ <RegExpr attribute="Known VMod Function" context="#stay" String="\.(enum|foo|date)" /> |
|
186 | 187 |
<RegExpr attribute="Known VMod Function" context="#stay" String="directors\.(fallback|hash|random|round_robin)" /> |
187 | 188 |
<RegExpr attribute="Known VMod Function" context="#stay" String="\.(add_backend|backend)" /> |
188 | 189 |
<RegExpr attribute="Known VMod Function" context="#stay" String="std\.(cache_req_body|collect|duration|fileread|healthy|integer|ip|log|port|querysort|random|real|real2time|rollback|set_ip_tos|strstr|syslog|time|time2integer|time2real|timestamp|tolower|toupper)" /> |
The idea is that, by default, text editors should consider most *.vcl files as
Varnish 4 configuration files.
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<!DOCTYPE language SYSTEM "language.dtd"> |
3 |
-<language name="Varnish4 Configuration Language" version="0.1" kateversion="2.4" section="Configuration" extensions="*.vcl;" mimetype="" author="Xavier Guerrin (xavier@tuxfamily.org)" license="WTFPL"> |
|
3 |
+<language name="Varnish4 Configuration Language" version="0.1" kateversion="2.4" section="Configuration" extensions="*.vcl;" mimetype="" author="Xavier Guerrin (xavier@tuxfamily.org)" license="WTFPL" priority="4"> |
|
4 | 4 |
<highlighting> |
5 | 5 |
<list name="vclStandardSubs"> |
6 | 6 |
<item>vcl_recv</item> |
... | ... |
@@ -134,11 +134,11 @@ |
134 | 134 |
<RegExpr attribute="Storage" context="#stay" String="storage\.[a-zA-Z0-9]+(?:\.(?:free_space|used_space|happy))?" /> |
135 | 135 |
<RegExpr attribute="TCP Property" context="#stay" String="client\.(ip|identity)" /> |
136 | 136 |
<RegExpr attribute="TCP Property" context="#stay" String="server\.(ip|hostname|identity|port)" /> |
137 |
- <RegExpr attribute="HTTP Property" context="#stay" String="req\.(request|url|proto|backend|restarts|esi_level|ttl|grace|keep|xid|esi|can_gzip|backend\.healthy|hash_ignore_busy|hash_always_miss)" /> |
|
138 |
- <RegExpr attribute="HTTP Property" context="#stay" String="bereq\.(request|url|proto|connect_timeout|first_byte_timeout|between_bytes_timeout)" /> |
|
139 |
- <RegExpr attribute="HTTP Property" context="#stay" String="obj\.(proto|status|response|hits|ttl|grace|keep|lastuse)" /> |
|
140 |
- <RegExpr attribute="HTTP Property" context="#stay" String="beresp\.(proto|saintmode|status|response|do_esi|do_stream|do_gzip|do_gunzip|ttl|grace|keep|backend\.(name|ip|port)|storage|cacheable)" /> |
|
141 |
- <RegExpr attribute="HTTP Property" context="#stay" String="resp\.(proto|status|response)" /> |
|
137 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="req\.(method|url|proto|restarts|esi_level|ttl|xid|esi|can_gzip|backend_hint|hash_ignore_busy|hash_always_miss)" /> |
|
138 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="bereq\.(xid|retries|backend|method|url|proto|uncacheable|connect_timeout|first_byte_timeout|between_bytes_timeout)" /> |
|
139 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="obj\.(proto|status|reason|hits|ttl|grace|keep|uncacheable)" /> |
|
140 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="beresp\.(proto|status|reason|do_esi|do_stream|do_gzip|do_gunzip|uncacheable|ttl|grace|keep|backend\.(name|ip)|storage_hint)" /> |
|
141 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="resp\.(proto|status|reason)" /> |
|
142 | 142 |
<RegExpr attribute="HTTP X- Header" context="#stay" String="(req|bereq|resp|beresp|obj)\.http\.X-[-_A-Za-z0-9]*" /> |
143 | 143 |
<RegExpr attribute="HTTP Header" context="#stay" String="(req|bereq|resp|beresp|obj)\.http\.[A-Za-z][-_A-Za-z0-9]*" /> |
144 | 144 |
</context> |
This backend property now appears only in the ChangeLog.
... | ... |
@@ -267,7 +267,7 @@ |
267 | 267 |
<DetectChar attribute="Normal Text" context="#pop" char=";" /> |
268 | 268 |
</context> |
269 | 269 |
<context name="backend_definition" attribute="Normal Text" lineEndContext="#stay"> |
270 |
- <RegExpr attribute="Backend Property" context="#stay" String="\.(host|port|host_header|connect_timeout|first_byte_timeout|between_bytes_timeout|max_connections|saintmode_threshold)" /> |
|
270 |
+ <RegExpr attribute="Backend Property" context="#stay" String="\.(host|port|host_header|connect_timeout|first_byte_timeout|between_bytes_timeout|max_connections)" /> |
|
271 | 271 |
<IncludeRules context="definition_code" /> |
272 | 272 |
<StringDetect attribute="Backend Property" context="probe_declaration" String=".probe" /> |
273 | 273 |
<DetectChar attribute="Region Marker" context="#pop#pop" char="}" endRegion="backend_block" /> |
... | ... |
@@ -208,9 +208,18 @@ |
208 | 208 |
<IncludeRules context="embedded-c" /> |
209 | 209 |
</context> |
210 | 210 |
<context name="return_statement" attribute="Normal Text" lineEndContext="#stay"> |
211 |
+ <IncludeRules context="comments" /> |
|
212 |
+ <StringDetect attribute="Keyword" context="return_synth" String="synth" /> |
|
211 | 213 |
<keyword attribute="Action Keyword" context="#stay" String="vclModes" /> |
212 | 214 |
<DetectChar attribute="Normal Text" char=";" context="#pop" /> |
213 | 215 |
</context> |
216 |
+ <context name="return_synth" attribute="Normal Text" lineEndContext="#stay"> |
|
217 |
+ <IncludeRules context="comments" /> |
|
218 |
+ <Int attribute="Decimal" context="#stay" /> |
|
219 |
+ <DetectChar char=""" context="string" attribute="String" /> |
|
220 |
+ <Detect2Chars attribute="String" char="{" char1=""" context="string_enclosure" beginRegion="string_enclosure_block" /> |
|
221 |
+ <DetectChar attribute="Normal Text" char=")" context="#pop" /> |
|
222 |
+ </context> |
|
214 | 223 |
<context name="string_enclosure" attribute="String" lineEndContext="#stay"> |
215 | 224 |
<Detect2Chars attribute="String" char=""" char1="}" context="#pop" endRegion="string_enclosure_block" /> |
216 | 225 |
</context> |
Namely, the "directors", "debug" and "std" VMods.
... | ... |
@@ -95,6 +95,7 @@ |
95 | 95 |
<item>urlcode</item> |
96 | 96 |
<item>var</item> |
97 | 97 |
<item>timers</item> |
98 |
+ <item>directors</item> |
|
98 | 99 |
</list> |
99 | 100 |
<contexts> |
100 | 101 |
<context name="normal_text" attribute="Normal Text" lineEndContext="#stay"> |
... | ... |
@@ -175,12 +176,16 @@ |
175 | 176 |
</context> |
176 | 177 |
<context name="minimal_code" attribute="Normal Text" lineEndContext="#stay"> |
177 | 178 |
<IncludeRules context="comments" /> |
178 |
- <RegExpr attribute="Duration" context="#stay" String="([0-9]+|[0-9]+\.[0-9]+|[0-9]+\.|\.[0-9]+)\s*(w|d|h|m|s|ms)" /> |
|
179 |
+ <RegExpr attribute="Duration" context="#stay" String="([0-9]+|[0-9]+\.[0-9]+|[0-9]+\.|\.[0-9]+)\s*(y|w|d|h|m|s|ms)" /> |
|
179 | 180 |
<RegExpr attribute="Data Size" context="#stay" String="([0-9]+|[0-9]+\.[0-9]+|[0-9]+\.|\.[0-9]+)\s*[KMGT]?B" /> |
180 | 181 |
<Float attribute="Float" context="#stay" /> |
181 | 182 |
<Int attribute="Decimal" context="#stay" /> |
182 | 183 |
<StringDetect attribute="Keyword" context="#stay" String="true" /> |
183 | 184 |
<StringDetect attribute="Keyword" context="#stay" String="false" /> |
185 |
+ <RegExpr attribute="Known VMod Function" context="#stay" String="debug\.(panic|author|obj|test_priv_(?:call|vcl)|str2blob|blob2hex|no_backend|rot52)" /> |
|
186 |
+ <RegExpr attribute="Known VMod Function" context="#stay" String="directors\.(fallback|hash|random|round_robin)" /> |
|
187 |
+ <RegExpr attribute="Known VMod Function" context="#stay" String="\.(add_backend|backend)" /> |
|
188 |
+ <RegExpr attribute="Known VMod Function" context="#stay" String="std\.(cache_req_body|collect|duration|fileread|healthy|integer|ip|log|port|querysort|random|real|real2time|rollback|set_ip_tos|strstr|syslog|time|time2integer|time2real|timestamp|tolower|toupper)" /> |
|
184 | 189 |
<DetectChar char=""" context="string" attribute="String" /> |
185 | 190 |
<Detect2Chars attribute="String" char="{" char1=""" context="string_enclosure" beginRegion="string_enclosure_block" /> |
186 | 191 |
</context> |
... | ... |
@@ -347,6 +352,7 @@ |
347 | 352 |
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/> |
348 | 353 |
<itemData name="VMod Identifier" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" /> |
349 | 354 |
<itemData name="Well-known VMod" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" bold="1" /> |
355 |
+ <itemData name="Known VMod Function" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" bold="0" /> |
|
350 | 356 |
</itemDatas> |
351 | 357 |
</highlighting> |
352 | 358 |
<general> |
... | ... |
@@ -106,6 +106,7 @@ |
106 | 106 |
<RegExpr attribute="Keyword" context="acl_declaration" String="^\s*acl\s+" /> |
107 | 107 |
<RegExpr attribute="Keyword" context="import_declaration" String="^\s*import\s+" /> |
108 | 108 |
<RegExpr attribute="Keyword" context="include_declaration" String="^\s*include\s+" /> |
109 |
+ <RegExpr attribute="Keyword" context="version_declaration" String="^\s*vcl\s+" /> |
|
109 | 110 |
<IncludeRules context="embedded-c" /> |
110 | 111 |
</context> |
111 | 112 |
<context name="embedded-c" attribute="Normal Text" lineEndContext="#stay"> |
... | ... |
@@ -311,6 +312,10 @@ |
311 | 312 |
<context name="include_path_complete" attribute="Normal Text" lineEndContext="#stay"> |
312 | 313 |
<DetectChar attribute="Normal Text" context="#pop#pop#pop" char=";" /> |
313 | 314 |
</context> |
315 |
+ <context name="version_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
316 |
+ <Float attribute="Float" context="#stay" /> |
|
317 |
+ <DetectChar attribute="Normal Text" context="#pop" char=";" /> |
|
318 |
+ </context> |
|
314 | 319 |
</contexts> |
315 | 320 |
<itemDatas> |
316 | 321 |
<itemData name="Normal Text" defStyleNum="dsNormal" /> |
... | ... |
@@ -7,41 +7,43 @@ |
7 | 7 |
<item>vcl_pipe</item> |
8 | 8 |
<item>vcl_pass</item> |
9 | 9 |
<item>vcl_hash</item> |
10 |
- <item>vcl_hit</item> |
|
10 |
+ <item>vcl_purge</item> |
|
11 | 11 |
<item>vcl_miss</item> |
12 |
- <item>vcl_fetch</item> |
|
12 |
+ <item>vcl_hit</item> |
|
13 | 13 |
<item>vcl_deliver</item> |
14 |
+ <item>vcl_synth</item> |
|
15 |
+ <item>vcl_backend_fetch</item> |
|
16 |
+ <item>vcl_backend_response</item> |
|
17 |
+ <item>vcl_backend_error</item> |
|
14 | 18 |
<item>vcl_init</item> |
15 | 19 |
<item>vcl_fini</item> |
16 |
- <item>vcl_error</item> |
|
17 | 20 |
</list> |
18 | 21 |
<list name="vclConditionalKeywords"> |
19 | 22 |
<item> if </item> |
20 | 23 |
<item> else </item> |
24 |
+ <item> elif </item> |
|
21 | 25 |
<item> elsif </item> |
22 | 26 |
<item> elseif </item> |
23 | 27 |
</list> |
24 | 28 |
<list name="vclKeywords"> |
25 |
- <item> set </item> |
|
26 | 29 |
<item> call </item> |
27 |
- <item> error </item> |
|
28 |
- <item> esi </item> |
|
29 |
- <item> include </item> |
|
30 |
- <item> remove </item> |
|
30 |
+ <item> set </item> |
|
31 | 31 |
<item> unset </item> |
32 |
- <item> panic </item> |
|
32 |
+ <item> new </item> |
|
33 | 33 |
<item> rollback </item> |
34 |
- <item> purge </item> |
|
35 | 34 |
<item> synthetic </item> |
35 |
+ <item> esi </item> |
|
36 |
+ <item> include </item> |
|
37 |
+ <item> panic </item> |
|
36 | 38 |
</list> |
37 | 39 |
<list name="vclStandardFunctions"> |
38 | 40 |
<item> hash_data </item> |
39 | 41 |
<item> regsub </item> |
40 | 42 |
<item> regsuball </item> |
41 | 43 |
<item> ban </item> |
42 |
- <item> ban_url </item> |
|
43 | 44 |
</list> |
44 | 45 |
<list name="vclModes"> |
46 |
+ <item>abandon</item> |
|
45 | 47 |
<item>deliver</item> |
46 | 48 |
<item>error</item> |
47 | 49 |
<item>fetch</item> |
... | ... |
@@ -51,7 +53,10 @@ |
51 | 53 |
<item>ok</item> |
52 | 54 |
<item>pass</item> |
53 | 55 |
<item>pipe</item> |
56 |
+ <item>purge</item> |
|
54 | 57 |
<item>restart</item> |
58 |
+ <item>retry</item> |
|
59 |
+ <item>synth</item> |
|
55 | 60 |
</list> |
56 | 61 |
<list name="vclDirectorTypes"> |
57 | 62 |
<item>random</item> |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,349 @@ |
1 |
+<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
+<!DOCTYPE language SYSTEM "language.dtd"> |
|
3 |
+<language name="Varnish4 Configuration Language" version="0.1" kateversion="2.4" section="Configuration" extensions="*.vcl;" mimetype="" author="Xavier Guerrin (xavier@tuxfamily.org)" license="WTFPL"> |
|
4 |
+ <highlighting> |
|
5 |
+ <list name="vclStandardSubs"> |
|
6 |
+ <item>vcl_recv</item> |
|
7 |
+ <item>vcl_pipe</item> |
|
8 |
+ <item>vcl_pass</item> |
|
9 |
+ <item>vcl_hash</item> |
|
10 |
+ <item>vcl_hit</item> |
|
11 |
+ <item>vcl_miss</item> |
|
12 |
+ <item>vcl_fetch</item> |
|
13 |
+ <item>vcl_deliver</item> |
|
14 |
+ <item>vcl_init</item> |
|
15 |
+ <item>vcl_fini</item> |
|
16 |
+ <item>vcl_error</item> |
|
17 |
+ </list> |
|
18 |
+ <list name="vclConditionalKeywords"> |
|
19 |
+ <item> if </item> |
|
20 |
+ <item> else </item> |
|
21 |
+ <item> elsif </item> |
|
22 |
+ <item> elseif </item> |
|
23 |
+ </list> |
|
24 |
+ <list name="vclKeywords"> |
|
25 |
+ <item> set </item> |
|
26 |
+ <item> call </item> |
|
27 |
+ <item> error </item> |
|
28 |
+ <item> esi </item> |
|
29 |
+ <item> include </item> |
|
30 |
+ <item> remove </item> |
|
31 |
+ <item> unset </item> |
|
32 |
+ <item> panic </item> |
|
33 |
+ <item> rollback </item> |
|
34 |
+ <item> purge </item> |
|
35 |
+ <item> synthetic </item> |
|
36 |
+ </list> |
|
37 |
+ <list name="vclStandardFunctions"> |
|
38 |
+ <item> hash_data </item> |
|
39 |
+ <item> regsub </item> |
|
40 |
+ <item> regsuball </item> |
|
41 |
+ <item> ban </item> |
|
42 |
+ <item> ban_url </item> |
|
43 |
+ </list> |
|
44 |
+ <list name="vclModes"> |
|
45 |
+ <item>deliver</item> |
|
46 |
+ <item>error</item> |
|
47 |
+ <item>fetch</item> |
|
48 |
+ <item>hash</item> |
|
49 |
+ <item>hit_for_pass</item> |
|
50 |
+ <item>lookup</item> |
|
51 |
+ <item>ok</item> |
|
52 |
+ <item>pass</item> |
|
53 |
+ <item>pipe</item> |
|
54 |
+ <item>restart</item> |
|
55 |
+ </list> |
|
56 |
+ <list name="vclDirectorTypes"> |
|
57 |
+ <item>random</item> |
|
58 |
+ <item>client</item> |
|
59 |
+ <item>hash</item> |
|
60 |
+ <item>round-robin</item> |
|
61 |
+ <item>dns</item> |
|
62 |
+ <item>fallback</item> |
|
63 |
+ </list> |
|
64 |
+ <!-- |
|
65 |
+ 2013-06-16 |
|
66 |
+ This list was generated from https://www.varnish-cache.org/vmods, taking |
|
67 |
+ only vmods having the "Used in production" status, excluding the |
|
68 |
+ non-free ones. |
|
69 |
+ --> |
|
70 |
+ <list name="knownVMods"> |
|
71 |
+ <item>std</item> |
|
72 |
+ <item>example</item> |
|
73 |
+ <item>abtest</item> |
|
74 |
+ <item>threescale</item> |
|
75 |
+ <item>authentication</item> |
|
76 |
+ <item>boltsort</item> |
|
77 |
+ <item>crashhandler</item> |
|
78 |
+ <item>curl</item> |
|
79 |
+ <item>digest</item> |
|
80 |
+ <item>dns</item> |
|
81 |
+ <item>header</item> |
|
82 |
+ <item>memcached</item> |
|
83 |
+ <item>null</item> |
|
84 |
+ <item>querystring</item> |
|
85 |
+ <item>shield</item> |
|
86 |
+ <item>softpurge</item> |
|
87 |
+ <item>statsd</item> |
|
88 |
+ <item>throttle</item> |
|
89 |
+ <item>timeutils</item> |
|
90 |
+ <item>urlcode</item> |
|
91 |
+ <item>var</item> |
|
92 |
+ <item>timers</item> |
|
93 |
+ </list> |
|
94 |
+ <contexts> |
|
95 |
+ <context name="normal_text" attribute="Normal Text" lineEndContext="#stay"> |
|
96 |
+ <IncludeRules context="comments" /> |
|
97 |
+ <RegExpr attribute="Keyword" context="sub_declaration" String="^\s*sub\s+" /> |
|
98 |
+ <RegExpr attribute="Keyword" context="probe_declaration" String="^\s*probe\s+" /> |
|
99 |
+ <RegExpr attribute="Keyword" context="backend_declaration" String="^\s*backend\s+" /> |
|
100 |
+ <RegExpr attribute="Keyword" context="director_declaration" String="^\s*director\s+" /> |
|
101 |
+ <RegExpr attribute="Keyword" context="acl_declaration" String="^\s*acl\s+" /> |
|
102 |
+ <RegExpr attribute="Keyword" context="import_declaration" String="^\s*import\s+" /> |
|
103 |
+ <RegExpr attribute="Keyword" context="include_declaration" String="^\s*include\s+" /> |
|
104 |
+ <IncludeRules context="embedded-c" /> |
|
105 |
+ </context> |
|
106 |
+ <context name="embedded-c" attribute="Normal Text" lineEndContext="#stay"> |
|
107 |
+ <Detect2Chars char="C" char1="{" context="embedded-c_enclosure" attribute="Region Marker" beginRegion="embedded_c_block" /> |
|
108 |
+ </context> |
|
109 |
+ <context name="embedded-c_enclosure" attribute="Normal Text" lineEndContext="#stay"> |
|
110 |
+ <Detect2Chars char="}" char1="C" context="#pop" attribute="Region Marker" endRegion="embedded_c_block" /> |
|
111 |
+ <IncludeRules context="##C" /> |
|
112 |
+ </context> |
|
113 |
+ <context name="shell-like-comment" attribute="Comment" lineEndContext="#pop"> |
|
114 |
+ </context> |
|
115 |
+ <context name="c-like-comment" attribute="Comment" lineEndContext="#stay"> |
|
116 |
+ <Detect2Chars char="*" char1="/" context="#pop" attribute="Comment" /> |
|
117 |
+ </context> |
|
118 |
+ <context name="cplusplus-like-comment" attribute="Comment" lineEndContext="#pop"> |
|
119 |
+ </context> |
|
120 |
+ <context name="comments" attribute="Comment" lineEndContext="#pop"> |
|
121 |
+ <DetectChar char="#" context="shell-like-comment" attribute="Comment" /> |
|
122 |
+ <Detect2Chars char="/" char1="*" context="c-like-comment" attribute="Comment" /> |
|
123 |
+ <Detect2Chars char="/" char1="/" context="cplusplus-like-comment" attribute="Comment" /> |
|
124 |
+ </context> |
|
125 |
+ <context name="vcl_variables" attribute="Normal Text" lineEndContext="#stay"> |
|
126 |
+ <RegExpr attribute="Variable" context="#stay" String="now" /> |
|
127 |
+ <RegExpr attribute="Storage" context="#stay" String="storage\.[a-zA-Z0-9]+(?:\.(?:free_space|used_space|happy))?" /> |
|
128 |
+ <RegExpr attribute="TCP Property" context="#stay" String="client\.(ip|identity)" /> |
|
129 |
+ <RegExpr attribute="TCP Property" context="#stay" String="server\.(ip|hostname|identity|port)" /> |
|
130 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="req\.(request|url|proto|backend|restarts|esi_level|ttl|grace|keep|xid|esi|can_gzip|backend\.healthy|hash_ignore_busy|hash_always_miss)" /> |
|
131 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="bereq\.(request|url|proto|connect_timeout|first_byte_timeout|between_bytes_timeout)" /> |
|
132 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="obj\.(proto|status|response|hits|ttl|grace|keep|lastuse)" /> |
|
133 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="beresp\.(proto|saintmode|status|response|do_esi|do_stream|do_gzip|do_gunzip|ttl|grace|keep|backend\.(name|ip|port)|storage|cacheable)" /> |
|
134 |
+ <RegExpr attribute="HTTP Property" context="#stay" String="resp\.(proto|status|response)" /> |
|
135 |
+ <RegExpr attribute="HTTP X- Header" context="#stay" String="(req|bereq|resp|beresp|obj)\.http\.X-[-_A-Za-z0-9]*" /> |
|
136 |
+ <RegExpr attribute="HTTP Header" context="#stay" String="(req|bereq|resp|beresp|obj)\.http\.[A-Za-z][-_A-Za-z0-9]*" /> |
|
137 |
+ </context> |
|
138 |
+ <context name="vcl_operators" attribute="Operator" lineEndContext="#stay"> |
|
139 |
+ <DetectChar attribute="Logical Operator" context="#stay" char="!" /> |
|
140 |
+ <Detect2Chars attribute="Logical Operator" context="#stay" char="&" char1="&" /> |
|
141 |
+ <Detect2Chars attribute="Logical Operator" context="#stay" char="|" char1="|" /> |
|
142 |
+ |
|
143 |
+ <Detect2Chars attribute="Comparison Operator" context="#stay" char="=" char1="=" /> |
|
144 |
+ <Detect2Chars attribute="Comparison Operator" context="#stay" char="!" char1="=" /> |
|
145 |
+ <Detect2Chars attribute="Comparison Operator" context="#stay" char="<" char1="=" /> |
|
146 |
+ <Detect2Chars attribute="Comparison Operator" context="#stay" char=">" char1="=" /> |
|
147 |
+ <DetectChar attribute="Comparison Operator" context="#stay" char="<" /> |
|
148 |
+ <DetectChar attribute="Comparison Operator" context="#stay" char=">" /> |
|
149 |
+ <DetectChar attribute="Comparison Operator" context="#stay" char="~" /> |
|
150 |
+ <Detect2Chars attribute="Comparison Operator" context="#stay" char="!" char1="~" /> |
|
151 |
+ |
|
152 |
+ <DetectChar attribute="Arithmetic Operator" context="#stay" char="+" /> |
|
153 |
+ <DetectChar attribute="Arithmetic Operator" context="#stay" char="-" /> |
|
154 |
+ <DetectChar attribute="Arithmetic Operator" context="#stay" char="*" /> |
|
155 |
+ <DetectChar attribute="Arithmetic Operator" context="#stay" char="/" /> |
|
156 |
+ |
|
157 |
+ <Detect2Chars attribute="Arithmetic Operator" context="#stay" char="+" char1="=" /> |
|
158 |
+ <Detect2Chars attribute="Arithmetic Operator" context="#stay" char="-" char1="=" /> |
|
159 |
+ <Detect2Chars attribute="Arithmetic Operator" context="#stay" char="*" char1="=" /> |
|
160 |
+ <Detect2Chars attribute="Arithmetic Operator" context="#stay" char="/" char1="=" /> |
|
161 |
+ |
|
162 |
+ <Detect2Chars attribute="Arithmetic Operator" context="#stay" char="+" char1="+" /> |
|
163 |
+ <Detect2Chars attribute="Arithmetic Operator" context="#stay" char="-" char1="-" /> |
|
164 |
+ |
|
165 |
+ <Detect2Chars attribute="Arithmetic Operator" context="#stay" char=">" char1=">" /> |
|
166 |
+ <Detect2Chars attribute="Arithmetic Operator" context="#stay" char="<" char1="<" /> |
|
167 |
+ |
|
168 |
+ <DetectChar attribute="Operator" context="#stay" char="=" /> |
|
169 |
+ </context> |
|
170 |
+ <context name="minimal_code" attribute="Normal Text" lineEndContext="#stay"> |
|
171 |
+ <IncludeRules context="comments" /> |
|
172 |
+ <RegExpr attribute="Duration" context="#stay" String="([0-9]+|[0-9]+\.[0-9]+|[0-9]+\.|\.[0-9]+)\s*(w|d|h|m|s|ms)" /> |
|
173 |
+ <RegExpr attribute="Data Size" context="#stay" String="([0-9]+|[0-9]+\.[0-9]+|[0-9]+\.|\.[0-9]+)\s*[KMGT]?B" /> |
|
174 |
+ <Float attribute="Float" context="#stay" /> |
|
175 |
+ <Int attribute="Decimal" context="#stay" /> |
|
176 |
+ <StringDetect attribute="Keyword" context="#stay" String="true" /> |
|
177 |
+ <StringDetect attribute="Keyword" context="#stay" String="false" /> |
|
178 |
+ <DetectChar char=""" context="string" attribute="String" /> |
|
179 |
+ <Detect2Chars attribute="String" char="{" char1=""" context="string_enclosure" beginRegion="string_enclosure_block" /> |
|
180 |
+ </context> |
|
181 |
+ <context name="definition_code" attribute="Normal Text" lineEndContext="#stay"> |
|
182 |
+ <IncludeRules context="minimal_code" /> |
|
183 |
+ <DetectChar attribute="Operator" context="#stay" char="=" /> |
|
184 |
+ </context> |
|
185 |
+ <context name="basic_code" attribute="Normal Text" lineEndContext="#stay"> |
|
186 |
+ <IncludeRules context="minimal_code" /> |
|
187 |
+ <IncludeRules context="vcl_variables" /> |
|
188 |
+ <IncludeRules context="vcl_operators" /> |
|
189 |
+ </context> |
|
190 |
+ <context name="regular_code" attribute="Normal Text" lineEndContext="#stay"> |
|
191 |
+ <IncludeRules context="basic_code" /> |
|
192 |
+ <keyword attribute="Keyword" context="#stay" String="vclKeywords" /> |
|
193 |
+ <keyword attribute="Standard VCL Sub" context="#stay" String="vclStandardSubs" /> |
|
194 |
+ <keyword attribute="Standard VCL Function" context="#stay" String="vclStandardFunctions" /> |
|
195 |
+ <keyword attribute="Condition Keyword" context="condition_part" String="vclConditionalKeywords" /> |
|
196 |
+ <StringDetect attribute="Keyword" context="return_statement" String="return" /> |
|
197 |
+ <IncludeRules context="embedded-c" /> |
|
198 |
+ </context> |
|
199 |
+ <context name="return_statement" attribute="Normal Text" lineEndContext="#stay"> |
|
200 |
+ <keyword attribute="Action Keyword" context="#stay" String="vclModes" /> |
|
201 |
+ <DetectChar attribute="Normal Text" char=";" context="#pop" /> |
|
202 |
+ </context> |
|
203 |
+ <context name="string_enclosure" attribute="String" lineEndContext="#stay"> |
|
204 |
+ <Detect2Chars attribute="String" char=""" char1="}" context="#pop" endRegion="string_enclosure_block" /> |
|
205 |
+ </context> |
|
206 |
+ <context name="sub_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
207 |
+ <DetectSpaces /> |
|
208 |
+ <keyword attribute="Standard VCL Sub" context="#stay" String="vclStandardSubs" /> |
|
209 |
+ <DetectChar attribute="Region Marker" context="sub_definition" char="{" beginRegion="sub_block" /> |
|
210 |
+ </context> |
|
211 |
+ <context name="sub_definition" attribute="Normal Text" lineEndContext="#stay"> |
|
212 |
+ <IncludeRules context="regular_code" /> |
|
213 |
+ <DetectChar attribute="Region Marker" context="#pop#pop" char="}" endRegion="sub_block" /> |
|
214 |
+ </context> |
|
215 |
+ <context name="condition_part" attribute="Normal Text" lineEndContext="#stay"> |
|
216 |
+ <keyword attribute="Condition Keyword" context="#stay" String="vclConditionalKeywords" /> |
|
217 |
+ <DetectChar attribute="Region Marker" context="conditional_expression" char="(" beginRegion="conditional_expression_block" /> |
|
218 |
+ <DetectChar attribute="Region Marker" context="conditional_block" char="{" beginRegion="conditional_blockregion" /> |
|
219 |
+ </context> |
|
220 |
+ <context name="conditional_expression" attribute="Normal Text" lineEndContext="#stay"> |
|
221 |
+ <IncludeRules context="basic_code" /> |
|
222 |
+ <DetectChar attribute="Region Marker" context="conditional_expression" char="(" beginRegion="conditional_expression_block" /> |
|
223 |
+ <DetectChar attribute="Region Marker" context="#pop" char=")" endRegion="conditional_expression_block" /> |
|
224 |
+ </context> |
|
225 |
+ <context name="conditional_block" attribute="Normal Text" lineEndContext="#stay"> |
|
226 |
+ <IncludeRules context="regular_code" /> |
|
227 |
+ <DetectChar attribute="Region Marker" context="#pop#pop" char="}" endRegion="conditional_blockregion" /> |
|
228 |
+ </context> |
|
229 |
+ <context name="string" attribute="String" lineEndContext="#pop"> |
|
230 |
+ <DetectChar attribute="String" context="#pop" char=""" /> |
|
231 |
+ </context> |
|
232 |
+ <context name="probe_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
233 |
+ <DetectSpaces /> |
|
234 |
+ <DetectChar attribute="Operator" context="#stay" char="=" /> |
|
235 |
+ <DetectChar attribute="Region Marker" context="probe_definition" char="{" beginRegion="probe_block" /> |
|
236 |
+ <DetectChar attribute="Normal Text" context="#pop" char=";" /> |
|
237 |
+ </context> |
|
238 |
+ <context name="probe_definition" attribute="Normal Text" lineEndContext="#stay"> |
|
239 |
+ <RegExpr attribute="Probe Property" context="#stay" String="\.(url|request|window|threshold|initial|expected_response|interval|timeout)" /> |
|
240 |
+ <IncludeRules context="definition_code" /> |
|
241 |
+ <DetectChar attribute="Region Marker" context="#pop#pop" char="}" endRegion="probe_block" /> |
|
242 |
+ </context> |
|
243 |
+ <context name="backend_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
244 |
+ <DetectSpaces /> |
|
245 |
+ <DetectChar attribute="Operator" context="#stay" char="=" /> |
|
246 |
+ <DetectChar attribute="Region Marker" context="backend_definition" char="{" beginRegion="backend_block" /> |
|
247 |
+ <DetectChar attribute="Normal Text" context="#pop" char=";" /> |
|
248 |
+ </context> |
|
249 |
+ <context name="backend_definition" attribute="Normal Text" lineEndContext="#stay"> |
|
250 |
+ <RegExpr attribute="Backend Property" context="#stay" String="\.(host|port|host_header|connect_timeout|first_byte_timeout|between_bytes_timeout|max_connections|saintmode_threshold)" /> |
|
251 |
+ <IncludeRules context="definition_code" /> |
|
252 |
+ <StringDetect attribute="Backend Property" context="probe_declaration" String=".probe" /> |
|
253 |
+ <DetectChar attribute="Region Marker" context="#pop#pop" char="}" endRegion="backend_block" /> |
|
254 |
+ </context> |
|
255 |
+ <context name="director_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
256 |
+ <DetectSpaces /> |
|
257 |
+ <keyword attribute="Director Type" String="vclDirectorTypes" /> |
|
258 |
+ <StringDetect attribute="Director Type" String="round-robin" /> |
|
259 |
+ <DetectChar attribute="Region Marker" context="director_definition" char="{" beginRegion="director_block" /> |
|
260 |
+ </context> |
|
261 |
+ <context name="director_definition" attribute="Normal Text" lineEndContext="#stay"> |
|
262 |
+ <IncludeRules context="definition_code" /> |
|
263 |
+ <RegExpr attribute="Director Property" context="#stay" String="\.(retries|ttl|suffix)" /> |
|
264 |
+ <StringDetect attribute="Director Property" context="backend_declaration" String=".list" /> |
|
265 |
+ <DetectChar attribute="Region Marker" context="director_backend" char="{" beginRegion="director_backend_block" /> |
|
266 |
+ <DetectChar attribute="Region Marker" context="#pop#pop" char="}" endRegion="backend_block" /> |
|
267 |
+ </context> |
|
268 |
+ <context name="director_backend" attribute="Normal Text" lineEndContext="#stay"> |
|
269 |
+ <IncludeRules context="definition_code" /> |
|
270 |
+ <RegExpr attribute="Director Property" context="#stay" String="\.(weight|suffix)" /> |
|
271 |
+ <StringDetect attribute="Director Property" context="backend_declaration" String=".backend" /> |
|
272 |
+ <DetectChar attribute="Region Marker" context="#pop" char="}" endRegion="director_backend_block" /> |
|
273 |
+ </context> |
|
274 |
+ <context name="acl_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
275 |
+ <DetectChar attribute="Region Marker" context="acl_definition" char="{" beginRegion="acl_block" /> |
|
276 |
+ </context> |
|
277 |
+ <context name="acl_definition" attribute="Normal Text" lineEndContext="#stay"> |
|
278 |
+ <IncludeRules context="minimal_code" /> |
|
279 |
+ <DetectChar attribute="Logical Operator" context="#stay" char="!" /> |
|
280 |
+ <DetectChar attribute="Logical Operator" context="#stay" char="/" /> |
|
281 |
+ <DetectChar attribute="Region Marker" context="#pop#pop" char="}" endRegion="acl_block" /> |
|
282 |
+ </context> |
|
283 |
+ <context name="import_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
284 |
+ <keyword attribute="Well-known VMod" context="import_identified" String="knownVMods" /> |
|
285 |
+ <DetectIdentifier attribute="VMod Identifier" context="import_identified" /> |
|
286 |
+ </context> |
|
287 |
+ <context name="import_identified" attribute="Normal Text" lineEndContext="#stay"> |
|
288 |
+ <DetectChar attribute="Normal Text" context="#pop#pop" char=";" /> |
|
289 |
+ <StringDetect attribute="Keyword" context="import_from" String="from" /> |
|
290 |
+ </context> |
|
291 |
+ <context name="import_from" attribute="Normal Text" lineEndContext="#stay"> |
|
292 |
+ <DetectChar char=""" context="import_from_path" attribute="String" /> |
|
293 |
+ </context> |
|
294 |
+ <context name="import_from_path" attribute="String" lineEndContext="#stay"> |
|
295 |
+ <DetectChar char=""" context="import_from_path_complete" attribute="String" /> |
|
296 |
+ </context> |
|
297 |
+ <context name="import_from_path_complete" attribute="Normal Text" lineEndContext="#stay"> |
|
298 |
+ <DetectChar attribute="Normal Text" context="#pop#pop#pop#pop#pop" char=";" /> |
|
299 |
+ </context> |
|
300 |
+ <context name="include_declaration" attribute="Normal Text" lineEndContext="#stay"> |
|
301 |
+ <DetectChar char=""" context="include_path" attribute="String" /> |
|
302 |
+ </context> |
|
303 |
+ <context name="include_path" attribute="String" lineEndContext="#stay"> |
|
304 |
+ <DetectChar char=""" context="include_path_complete" attribute="String" /> |
|
305 |
+ </context> |
|
306 |
+ <context name="include_path_complete" attribute="Normal Text" lineEndContext="#stay"> |
|
307 |
+ <DetectChar attribute="Normal Text" context="#pop#pop#pop" char=";" /> |
|
308 |
+ </context> |
|
309 |
+ </contexts> |
|
310 |
+ <itemDatas> |
|
311 |
+ <itemData name="Normal Text" defStyleNum="dsNormal" /> |
|
312 |
+ <itemData name="Comment" defStyleNum="dsComment" /> |
|
313 |
+ <itemData name="Keyword" defStyleNum="dsKeyword" /> |
|
314 |
+ <itemData name="Condition Keyword" defStyleNum="dsKeyword" /> |
|
315 |
+ <itemData name="Action Keyword" defStyleNum="dsKeyword" /> |
|
316 |
+ <itemData name="Director Type" defStyleNum="dsDataType" /> |
|
317 |
+ <itemData name="Standard VCL Function" defStyleNum="dsFunction" /> |
|
318 |
+ <itemData name="Standard VCL Sub" defStyleNum="dsFunction" bold="1" /> |
|
319 |
+ <itemData name="Operator" defStyleNum="dsKeyword" color="#008000" bold="0" /> |
|
320 |
+ <itemData name="Comparison Operator" defStyleNum="dsKeyword" color="#008000" bold="0" /> |
|
321 |
+ <itemData name="Arithmetic Operator" defStyleNum="dsKeyword" color="#008000" bold="0" /> |
|
322 |
+ <itemData name="Logical Operator" defStyleNum="dsKeyword" color="#008000" bold="0" /> |
|
323 |
+ <itemData name="String" defStyleNum="dsString" bold="0" italic="0" /> |
|
324 |
+ <itemData name="Data Type" defStyleNum="dsDataType" /> |
|
325 |
+ <itemData name="Region Marker" defStyleNum="dsNormal" /> |
|
326 |
+ <itemData name="Probe Property" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" bold="1" italic="0" /> |
|
327 |
+ <itemData name="Backend Property" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" bold="1" italic="0" /> |
|
328 |
+ <itemData name="Director Property" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" bold="1" italic="0" /> |
|
329 |
+ <itemData name="Storage" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" bold="0" italic="0" /> |
|
330 |
+ <itemData name="TCP Property" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" bold="0" italic="1" /> |
|
331 |
+ <itemData name="HTTP Property" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" bold="0" italic="0" /> |
|
332 |
+ <itemData name="HTTP Header" defStyleNum="dsDataType" color="#0D62FF" selColor="#0D62FF" bold="0" italic="0" /> |
|
333 |
+ <itemData name="HTTP X- Header" defStyleNum="dsDataType" color="#0D62FF" selColor="#0D62FF" bold="0" italic="1" /> |
|
334 |
+ <itemData name="Decimal" defStyleNum="dsDecVal" /> |
|
335 |
+ <itemData name="Duration" defStyleNum="dsDecVal" /> |
|
336 |
+ <itemData name="Data Size" defStyleNum="dsDecVal" /> |
|
337 |
+ <itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/> |
|
338 |
+ <itemData name="VMod Identifier" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" /> |
|
339 |
+ <itemData name="Well-known VMod" defStyleNum="dsDataType" color="#0000FF" selColor="#0000FF" bold="1" /> |
|
340 |
+ </itemDatas> |
|
341 |
+ </highlighting> |
|
342 |
+ <general> |
|
343 |
+ <comments> |
|
344 |
+ <comment name="singleLine" start="#" /> |
|
345 |
+ </comments> |
|
346 |
+ <keywords casesensitive="1" /> |
|
347 |
+ </general> |
|
348 |
+</language> |
|
349 |
+<!-- kate: space-indent on; indent-width 2; replace-tabs on; --> |