blob: 28a2b06d8fb4f976565c42cdcabdf9c4e08cd78c (
plain)
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
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="AWK" version="0.92" kateversion="2.3" section="Scripts"
extensions="*.awk" mimetype="text/x-awk" indenter="cstyle"
license="LGPL">
<!-- patched by igli#kate@irc:chat.freenode.net -->
<highlighting>
<list name="keywords">
<item>if</item>
<item>else</item>
<item>while</item>
<item>do</item>
<item>for</item>
<item>in</item>
<item>continue</item>
<item>break</item>
<item>print</item>
<item>printf</item>
<item>getline</item>
<item>function</item>
<item>return</item>
<item>next</item>
<item>exit</item>
</list>
<list name="builtins">
<item>ARGC</item>
<item>ARGV</item>
<item>CONVFMT</item>
<item>ENVIRON</item>
<item>FILENAME</item>
<item>FNR</item>
<item>FS</item>
<item>NF</item>
<item>NR</item>
<item>OFMT</item>
<item>OFS</item>
<item>ORS</item>
<item>RS</item>
<item>RSTART</item>
<item>RLENGTH</item>
<item>SUBSEP</item>
</list>
<list name="functions">
<item>gsub</item>
<item>gensub</item>
<item>index</item>
<item>length</item>
<item>match</item>
<item>split</item>
<item>sprintf</item>
<item>sub</item>
<item>substr</item>
<item>tolower</item>
<item>toupper</item>
<item>atan2</item>
<item>cos</item>
<item>exp</item>
<item>int</item>
<item>log</item>
<item>rand</item>
<item>sin</item>
<item>sqrt</item>
<item>srand</item>
<item>close</item>
<item>fflush</item>
<item>system</item>
</list>
<list name="special">
<item> BEGIN </item>
<item> END </item>
</list>
<contexts>
<!-- START CONTEXTS -->
<context name="Pattern" attribute="Normal" lineEndContext="#stay">
<DetectChar char="{" context="Block" attribute="Keyword" beginRegion="block" />
<DetectChar char="}" attribute="Error" context="#stay"/>
<DetectChar char="/" firstNonSpace="true" lookAhead="true" context="MatchPattern"/>
<IncludeRules context="base" />
<keyword String="special" attribute="Special" context="#stay"/>
</context>
<context name="Block" attribute="Normal" lineEndContext="#stay">
<DetectChar char="}" attribute="Keyword" context="#pop" endRegion="block" />
<DetectChar char="{" context="Block" attribute="Keyword" beginRegion="block" />
<IncludeRules context="base" />
<keyword String="special" attribute="Error" context="#stay"/>
</context>
<context name="base">
<DetectSpaces />
<DetectChar char="#" context="Comment" attribute="Comment"/>
<DetectChar char="~" context="Match" attribute="Operator"/>
<DetectChar char=""" context="String" attribute="String"/>
<AnyChar String="!%&*+,-./:;<=>?^|" attribute="Operator" context="#stay"/>
<keyword String="keywords" attribute="Keyword" context="#stay"/>
<keyword String="builtins" attribute="Builtin" context="#stay"/>
<keyword String="functions" attribute="Function" context="#stay"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
<RegExpr String="\$[A-Za-z0-9_]+" attribute="Field" context="#stay"/>
</context>
<context name="String" attribute="String" lineEndContext="#stay">
<DetectChar char=""" attribute="String" context="#pop"/>
<HlCStringChar attribute="Escape" context="#stay"/>
<DetectChar char="\" context="Escape" attribute="Operator"/>
</context>
<context name="Comment" attribute="Comment" lineEndContext="#pop">
<IncludeRules context="##Alerts"/>
</context>
<context name="Escape" attribute="Normal" lineEndContext="#pop">
<RegExpr String="." attribute="String" context="#pop"/>
</context>
<context name="Match" attribute="Normal" lineEndContext="#pop"
fallthrough="true" fallthroughContext="#pop">
<DetectSpaces />
<Detect2Chars char="/" char1="^" attribute="Regex Op" context="Regex"/>
<DetectChar char="/" attribute="Regex Op" context="Regex"/>
</context>
<context name="Regex" attribute="Regex" lineEndContext="#stay">
<IncludeRules context="regex"/>
<DetectChar char="/" context="#pop#pop" attribute="Regex Op"/>
</context>
<context name="regex">
<HlCStringChar attribute="Escape" context="#stay"/>
<DetectChar char="\" context="Regex Escape" attribute="Regex Op"/>
<Detect2Chars char="[" char1="^" context="RegexChar" attribute="Regex Op"/>
<DetectChar char="[" context="RegexChar" attribute="Regex Op"/>
<AnyChar String="$.+?*()|" context="#stay" attribute="Regex Op"/>
</context>
<context name="Regex Escape" attribute="Normal" lineEndContext="#pop">
<RegExpr String="." attribute="Regex" context="#pop"/>
</context>
<context name="RegexChar" attribute="Regex" lineEndContext="#pop"
fallthrough="true" fallthroughContext="InChar">
<Detect2Chars char="-" char1="]" context="InChar" attribute="Regex"/>
<AnyChar String="-]" context="InChar" attribute="Regex"/>
</context>
<context name="InChar" attribute="Regex" lineEndContext="#stay">
<HlCStringChar attribute="String" context="#stay"/>
<DetectChar char="\" context="Regex Escape" attribute="Regex Op"/>
<Detect2Chars char="-" char1="]" context="Regex Escape" lookAhead="true"/>
<DetectChar char="]" context="#pop#pop" attribute="Regex Op"/>
<DetectChar char="-" context="#stay" attribute="Regex Op"/>
<RegExpr String="\[:(?=[_\w][_\d\w]*:\])" context="CharClass" attribute="Regex Op"/>
</context>
<context name="CharClass" attribute="Custom" lineEndContext="#pop">
<RegExpr String="(alpha|alnum|blank|cntrl|digit|graph|lower|punct|space|upper|xdigit)(?=:\])"
attribute="CharClass" context="#stay"/>
<Detect2Chars char=":" char1="]" attribute="Regex Op" context="#pop"/>
</context>
<context name="MatchPattern" attribute="Normal" lineEndContext="#pop"
fallthrough="true" fallthroughContext="#pop">
<Detect2Chars char="/" char1="^" attribute="Regex Op" context="RegexPattern"/>
<DetectChar char="/" attribute="Regex Op" context="RegexPattern"/>
</context>
<context name="RegexPattern" attribute="Regex" lineEndContext="#stay">
<IncludeRules context="regex"/>
<DetectChar char="/" context="CheckRange" attribute="Regex Op"/>
</context>
<context name="CheckRange" attribute="Normal" lineEndContext="#pop#pop#pop"
fallthrough="true" fallthroughContext="#pop#pop#pop">
<RegExpr String="\s*,\s*(?=/)" context="RangePattern" attribute="Operator"/>
</context>
<context name="RangePattern" attribute="Normal" lineEndContext="#pop#pop#pop#pop"
fallthrough="true" fallthroughContext="#pop#pop#pop#pop">
<Detect2Chars char="/" char1="^" attribute="Regex Op" context="Pattern2"/>
<DetectChar char="/" attribute="Regex Op" context="Pattern2"/>
</context>
<context name="Pattern2" attribute="Regex" lineEndContext="#stay">
<IncludeRules context="regex"/>
<DetectChar char="/" context="#pop#pop#pop#pop#pop" attribute="Regex Op"/>
</context>
<!-- END OF CONTEXTS -->
</contexts>
<itemDatas>
<itemData name="Normal" defStyleNum="dsNormal"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="Builtin" defStyleNum="dsNormal" color="#CC8822"/>
<itemData name="Function" defStyleNum="dsFunction"/>
<itemData name="Decimal" defStyleNum="dsDecVal"/>
<itemData name="Float" defStyleNum="dsFloat"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Escape" defStyleNum="dsString" color="#4A5704"/>
<itemData name="Field" defStyleNum="dsDataType"/>
<itemData name="Error" defStyleNum="dsError"/>
<itemData name="Special" defStyleNum="dsKeyword" color="#FF9225" bold="0"/>
<itemData name="Operator" defStyleNum="dsNormal" color="#FF80E0"/>
<itemData name="Regex" defStyleNum="dsString" color="#4A5704"/>
<itemData name="Regex Op" defStyleNum="dsOthers" color="#FF80E0"/>
<itemData name="CharClass" defStyleNum="dsString" color="#008080"/>
<itemData name="Custom" defStyleNum="dsString" color="#449944"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="#"/>
</comments>
<keywords casesensitive="1" />
</general>
</language>
|