summaryrefslogtreecommitdiffstats
path: root/kate/data/sed.xml
blob: 095d440a1908cecf9ed027d40419f092bc76b2d4 (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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="sed" section="Scripts" version="1.0" kateversion="2.4" extensions="*.sed" mimetype="text/x-sed" author="Bart Sas ([email protected])" license="GPL">
        <highlighting>
                <contexts>
                        <context name="BeginningOfLine" attribute="Normal" lineEndContext="#stay">
                                <DetectSpaces/>
                                <DetectChar char="#"     attribute="Comment"     context="Comment"/>
                                <RegExpr String="(/)"    attribute="Separator"   context="FirstAddressRegex"/>
                                <RegExpr String="\\(\S)" attribute="Separator"   context="FirstAddressRegex"/>
                                <Int                     attribute="Line Number" context="AfterFirstAddress"/>
                                <DetectChar char="$"     attribute="Last Line"   context="AfterFirstAddress"/>
                                <DetectChar char="}"     attribute="Brace"       context="AfterCommand"/>
                                <DetectChar char=":"     attribute="Label"       context="Label"/>
                                <DetectChar char="!"     attribute="Negation"    context="Command"/>
                                <IncludeRules                                    context="Command"/>
                                <RegExpr String="\S"     attribute="Error"       context="Error"/>
                        </context>

                        <context name="FirstAddressRegex" attribute="Regex" lineEndContext="Error" dynamic="true">
                                <DetectSpaces/>
                                <RegExpr String="\\%1" attribute="Regex Escape" context="#stay"             dynamic="true"/>
                                <RegExpr String="%1"   attribute="Separator"    context="AfterFirstAddress" dynamic="true"/>
                                <IncludeRules                                   context="Regex"/>
                        </context>

                        <context name="AfterFirstAddress" attribute="Normal" lineEndContext="BeginningOfLine">
                                <DetectSpaces/>
                                <DetectChar char="!" attribute="Negation" context="Command"/>
                                <IncludeRules                             context="AfterFirstAddress2"/>
                                <RegExpr String="\S" attribute="Error"    context="Error"/>
                        </context>

                        <context name="AfterFirstAddress2" attribute="Normal" lineEndContext="BeginningOfLine">
                                <DetectSpaces/>
                                <DetectChar char="," attribute="Normal" context="SecondAddress"/>
                                <DetectChar char="~" attribute="Normal" context="Step"/>
                                <IncludeRules                           context="Command"/>
                                <RegExpr String="\S" attribute="Error"  context="Error"/>
                        </context>

                        <context name="SecondAddress" attribute="Normal" lineEndContext="Error">
                                <DetectSpaces/>
                                <RegExpr String="(/)"    attribute="Separator"   context="SecondAddressRegex"/>
                                <RegExpr String="\\(\S)" attribute="Separator"   context="SecondAddressRegex"/>
                                <Int                     attribute="Line Number" context="AfterSecondAddress"/>
                                <DetectChar char="$"     attribute="Last Line"   context="AfterSecondAddress"/>
                                <RegExpr String="\S"     attribute="Error"       context="Error"/>
                        </context>

                        <context name="SecondAddressRegex" attribute="Regex" lineEndContext="Error" dynamic="true">
                                <DetectSpaces/>
                                <RegExpr String="\\%1" attribute="Regex Escape" context="#stay"              dynamic="true"/>
                                <RegExpr String="%1"   attribute="Separator"    context="AfterSecondAddress" dynamic="true"/>
                                <IncludeRules                                   context="Regex"/>
                        </context>

                        <context name="AfterSecondAddress" attribute="Normal" lineEndContext="Error" dynamic="true">
                                <DetectSpaces/>
                                <DetectChar char="!" attribute="Negation" context="Command"/>
                                <IncludeRules                             context="Command"/>
                                <RegExpr String="\S" attribute="Error"    context="Error"/>
                        </context>

                        <context name="Step" attribute="Normal" lineEndContext="Error">
                                <DetectSpaces/>
                                <Int                 attribute="Step"  context="Command"/>
                                <RegExpr String="\S" attribute="Error" context="Error"/>
                        </context>

                        <context name="Command" attribute="Normal" lineEndContext="Error">
                                <DetectSpaces/>
                                <DetectChar char="s"              attribute="Command" context="SCommand"/>
                                <DetectChar char="y"              attribute="Command" context="YCommand"/>
                                <AnyChar String="dpnDNPhHgGxFvz=" attribute="Command" context="AfterCommand"/>
                                <AnyChar String="aic"             attribute="Command" context="AICCommand"/>
                                <AnyChar String="bTt"             attribute="Command" context="BTCommand"/>
                                <AnyChar String="WwrR"            attribute="Command" context="WRCommand"/>
                                <AnyChar String="lL"              attribute="Command" context="LCommand"/>
                                <AnyChar String="qQ"              attribute="Command" context="QCommand"/>
                                <DetectChar char="{"              attribute="Brace"   context="BeginningOfLine"/>
                                <RegExpr String="\S"              attribute="Error"   context="Error"/>
                        </context>

                        <context name="SCommand" attribute="Normal" lineEndContext="Error">
                                <DetectSpaces/>
                                <RegExpr String="(\S)" attribute="Separator" context="SRegex"/>
                        </context>

                        <context name="SRegex" attribute="Regex" lineEndContext="Error" dynamic="true">
                                <DetectSpaces/>
                                <RegExpr String="\\%1" attribute="Regex Escape" context="#stay"        dynamic="true"/>
                                <RegExpr String="(%1)" attribute="Separator"    context="SReplacement" dynamic="true"/>
                                <IncludeRules                                   context="Regex"/>
                        </context>

                        <context name="SReplacement" attribute="Replacement" lineEndContext="Error" dynamic="true">
                                <DetectSpaces/>
                                <RegExpr String="\\%1"                attribute="Repl Escape" context="#stay"  dynamic="true"/>
                                <RegExpr String="%1"                  attribute="Separator"   context="SFlags" dynamic="true"/>
                                <RegExpr String="\\[0-9LlUuE\\&amp;]" attribute="Repl Escape" context="#stay"/>
                                <DetectChar char="&amp;"              attribute="Repl Escape" context="#stay"/>
                        </context>

                        <context name="SFlags" attribute="Normal" lineEndContext="BeginningOfLine">
                                <DetectSpaces/>
                                <AnyChar String="gpeIiMm" attribute="Flag"        context="#stay"/>
                                <DetectChar char="w"      attribute="Flag"        context="WFlag"/>
                                <Int                      attribute="Repl Number" context="#stay"/>
                                <IncludeRules                                     context="AfterCommand"/>
                        </context>

                        <context name="WFlag" attribute="Normal" lineEndContext="BeginningOfLine">
                                <DetectSpaces/>
                                <RegExpr String="\S+" attribute="Filename" context="SFlags"/>
                        </context>

                        <context name="YCommand" attribute="Normal" lineEndContext="Error">
                                <DetectSpaces/>
                                <RegExpr String="(\S)" attribute="Separator" context="YSourceList"/>
                        </context>

                        <context name="YSourceList" attribute="Char List" lineEndContext="Error" dynamic="true">
                                <DetectSpaces/>
                                <RegExpr String="\\%1"           attribute="Char List Escape" context="#stay"     dynamic="true"/>
                                <RegExpr String="(%1)"           attribute="Separator"        context="YDestList" dynamic="true"/>
                                <Detect2Chars char="\" char1="n" attribute="Char List Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="\" attribute="Char List Escape" context="#stay"/>
                        </context>

                        <context name="YDestList" attribute="Char List" lineEndContext="Error" dynamic="true">
                                <DetectSpaces/>
                                <RegExpr String="\\%1"           attribute="Char List Escape" context="#stay"        dynamic="true"/>
                                <RegExpr String="%1"             attribute="Separator"        context="AfterCommand" dynamic="true"/>
                                <Detect2Chars char="\" char1="n" attribute="Char List Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="\" attribute="Char List Escape" context="#stay"/>
                        </context>

                        <context name="AICCommand" attribute="Normal" lineEndContext="Error">
                                <DetectSpaces/>
                                <LineContinue             attribute="Line Continue" context="LiteralText"/>
                                <RegExpr      String="\S" attribute="Error"         context="Error"/>
                        </context>

                        <context name="LiteralText" attribute="Literal Text" lineEndContext="BeginningOfLine">
                                <Detect2Chars char="\" char1="\" attribute="Literal Escape" context="LiteralText"/>
                                <LineContinue                    attribute="Line Continue"  context="LiteralText"/>
                                <DetectChar   char="\"           attribute="Error"          context="Error"/>
                        </context>

                        <context name="BTCommand" attribute="Normal" lineEndContext="BeginningOfLine">
                                <DetectSpaces/>
                                <RegExpr String="\w+" attribute="Label" context="AfterCommand"/>
                                <IncludeRules                           context="AfterCommand"/>
                        </context>

                        <context name="WRCommand" attribute="Normal" lineEndContext="Error">
                                <DetectSpaces/>
                                <RegExpr String="\S+" attribute="Filename" context="AfterCommand"/>
                        </context>

                        <context name="LCommand" attribute="Normal" lineEndContext="BeginningOfLine">
                                <DetectSpaces/>
                                <Int attribute="Wrap Length" context="AfterCommand"/>
                                <IncludeRules                context="AfterCommand"/>
                        </context>

                        <context name="QCommand" attribute="Normal" lineEndContext="BeginningOfLine">
                                <DetectSpaces/>
                                <Int attribute="Exit Code" context="AfterCommand"/>
                                <IncludeRules              context="AfterCommand"/>
                        </context>

                        <context name="Label" attribute="Normal" lineEndContext="Error">
                                <DetectSpaces/>
                                <RegExpr String="\w+" attribute="Label" context="AfterCommand"/>
                                <RegExpr String="\S"  attribute="Error" context="Error"/>
                        </context>

                        <context name="AfterCommand" attribute="Normal" lineEndContext="BeginningOfLine">
                                <DetectSpaces/>
                                <DetectChar char=";" attribute="Normal"  context="BeginningOfLine"/>
                                <DetectChar char="}" attribute="Brace"   context="AfterCommand"/>
                                <DetectChar char="#" attribute="Comment" context="Comment"/>
                                <RegExpr String="\S" attribute="Error"   context="Error"/>
                        </context>

                        <context name="Regex" attribute="Regex" lineEndContext="Error">
                                <Detect2Chars char="\" char1="(" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1=")" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="+" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="?" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="|" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="{" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="}" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="[" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="]" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="." attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="*" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="\" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="^" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="$" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="n" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="t" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="0" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="1" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="2" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="3" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="4" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="5" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="6" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="7" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="8" attribute="Regex Escape" context="#stay"/>
                                <Detect2Chars char="\" char1="9" attribute="Regex Escape" context="#stay"/>
                                <DetectChar   char="*"           attribute="Regex Escape" context="#stay"/>
                                <DetectChar   char="."           attribute="Regex Escape" context="#stay"/>
                                <DetectChar   char="^"           attribute="Regex Escape" context="#stay"/>
                                <DetectChar   char="$"           attribute="Regex Escape" context="#stay"/>
                                <DetectChar   char="["           attribute="Regex Escape" context="#stay"/>
                                <DetectChar   char="]"           attribute="Regex Escape" context="#stay"/>
                        </context>

                        <context name="Comment" attribute="Comment" lineEndContext="BeginningOfLine"/>
                        <context name="Error"   attribute="Error"   lineEndContext="BeginningOfLine"/>
                </contexts>

                <itemDatas>
                        <itemData name="Normal"           defStyleNum="dsNormal"/>

                        <itemData name="Regex"            defStyleNum="dsString"/>
                        <itemData name="Regex Escape"     defStyleNum="dsChar"/>
                        <itemData name="Replacement"      defStyleNum="dsString"/>
                        <itemData name="Repl Escape"      defStyleNum="dsChar"/>
                        <itemData name="Char List"        defStyleNum="dsString"/>
                        <itemData name="Char List Escape" defStyleNum="dsChar"/>
                        <itemData name="Separator"        defStyleNum="dsString" color="#00F"/>

                        <itemData name="Line Number"      defStyleNum="dsDecVal"/>
                        <itemData name="Step"             defStyleNum="dsDecVal"/>
                        <itemData name="Last Line"        defStyleNum="dsOthers" color="#808" bold="1"/>
                        <itemData name="Negation"         defStyleNum="dsOthers" color="#808" bold="1"/>

                        <itemData name="Command"          defStyleNum="dsKeyword"/>
                        <itemData name="Label"            defStyleNum="dsFunction"/>
                        <itemData name="Brace"            defStyleNum="dsNormal"/>

                        <itemData name="Flag"             defStyleNum="dsDataType"/>
                        <itemData name="Repl Number"      defStyleNum="dsDecVal"/>
                        <itemData name="Exit Code"        defStyleNum="dsDecVal"/>
                        <itemData name="Filename"         defStyleNum="dsBaseN"/>
                        <itemData name="Wrap Length"      defStyleNum="dsDecVal"/>

                        <itemData name="Line Continue"    defStyleNum="dsOthers" color="#000" bold="1"/>
                        <itemData name="Literal Text"     defStyleNum="dsOthers" color="#080" italic="1"/>
                        <itemData name="Literal Escape"   defStyleNum="dsOthers" color="#0A0" italic="1"/>

                        <itemData name="Comment"          defStyleNum="dsComment"/>
                        <itemData name="Error"            defStyleNum="dsError"/>
                </itemDatas>
        </highlighting>

        <general>
                <comments>
                        <comment name="singleLine" start="#"/>
                </comments>
        </general>
</language>