| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<language name="sed" section="Scripts" version="8" kateversion="5.0" extensions="*.sed" mimetype="text/x-sed" author="Bart Sas ([email protected])" license="GPL"> |
| 4 |
<highlighting> |
| 5 |
<contexts> |
| 6 |
<context name="BeginningOfLine" attribute="Normal" lineEndContext="#stay"> |
| 7 |
<DetectSpaces/> |
| 8 |
<DetectChar char="#" attribute="Comment" context="Comment"/> |
| 9 |
<RegExpr String="(?|(/)|\\(\S))" attribute="Separator" context="FirstAddressRegex"/> |
| 10 |
<Int attribute="Line Number" context="AfterFirstAddress"/> |
| 11 |
<DetectChar char="$" attribute="Last Line" context="AfterFirstAddress"/> |
| 12 |
<DetectChar char="}" attribute="Brace" context="AfterCommand"/> |
| 13 |
<DetectChar char=":" attribute="Label" context="Label"/> |
| 14 |
<DetectChar char="!" attribute="Negation" context="Command"/> |
| 15 |
<IncludeRules context="Command"/> |
| 16 |
</context> |
| 17 |
|
| 18 |
<context name="FirstAddressRegex" attribute="Regex" lineEndContext="Error" dynamic="true"> |
| 19 |
<DetectSpaces/> |
| 20 |
<StringDetect String="\%1" attribute="Regex Escape" context="#stay" dynamic="true"/> |
| 21 |
<StringDetect String="%1" attribute="Separator" context="AfterFirstAddress" dynamic="true"/> |
| 22 |
<IncludeRules context="Regex"/> |
| 23 |
</context> |
| 24 |
|
| 25 |
<context name="AfterFirstAddress" attribute="Normal" lineEndContext="BeginningOfLine"> |
| 26 |
<DetectSpaces/> |
| 27 |
<DetectChar char="!" attribute="Negation" context="Command"/> |
| 28 |
<IncludeRules context="AfterFirstAddress2"/> |
| 29 |
</context> |
| 30 |
|
| 31 |
<context name="AfterFirstAddress2" attribute="Normal" lineEndContext="BeginningOfLine"> |
| 32 |
<DetectChar char="," attribute="Normal" context="SecondAddress"/> |
| 33 |
<DetectChar char="~" attribute="Normal" context="Step"/> |
| 34 |
<IncludeRules context="Command"/> |
| 35 |
</context> |
| 36 |
|
| 37 |
<context name="SecondAddress" attribute="Normal" lineEndContext="Error"> |
| 38 |
<DetectSpaces/> |
| 39 |
<RegExpr String="(?|(/)|\\(\S))" attribute="Separator" context="SecondAddressRegex"/> |
| 40 |
<Int attribute="Line Number" context="AfterSecondAddress"/> |
| 41 |
<DetectChar char="$" attribute="Last Line" context="AfterSecondAddress"/> |
| 42 |
<RegExpr String="\S" attribute="Error" context="Error"/> |
| 43 |
</context> |
| 44 |
|
| 45 |
<context name="SecondAddressRegex" attribute="Regex" lineEndContext="Error" dynamic="true"> |
| 46 |
<DetectSpaces/> |
| 47 |
<StringDetect String="\%1" attribute="Regex Escape" context="#stay" dynamic="true"/> |
| 48 |
<StringDetect String="%1" attribute="Separator" context="AfterSecondAddress" dynamic="true"/> |
| 49 |
<IncludeRules context="Regex"/> |
| 50 |
</context> |
| 51 |
|
| 52 |
<context name="AfterSecondAddress" attribute="Normal" lineEndContext="Error" dynamic="true"> |
| 53 |
<DetectSpaces/> |
| 54 |
<DetectChar char="!" attribute="Negation" context="Command"/> |
| 55 |
<IncludeRules context="Command"/> |
| 56 |
</context> |
| 57 |
|
| 58 |
<context name="Step" attribute="Normal" lineEndContext="Error"> |
| 59 |
<DetectSpaces/> |
| 60 |
<Int attribute="Step" context="Command"/> |
| 61 |
<RegExpr String="\S" attribute="Error" context="Error"/> |
| 62 |
</context> |
| 63 |
|
| 64 |
<context name="Command" attribute="Normal" lineEndContext="Error"> |
| 65 |
<DetectSpaces/> |
| 66 |
<DetectChar char="s" attribute="Command" context="SCommand"/> |
| 67 |
<DetectChar char="y" attribute="Command" context="YCommand"/> |
| 68 |
<AnyChar String="dpnDNPhHgGxFvz=" attribute="Command" context="AfterCommand"/> |
| 69 |
<AnyChar String="aic" attribute="Command" context="AICCommand"/> |
| 70 |
<AnyChar String="bTt" attribute="Command" context="BTCommand"/> |
| 71 |
<AnyChar String="WwrR" attribute="Command" context="WRCommand"/> |
| 72 |
<AnyChar String="lL" attribute="Command" context="LCommand"/> |
| 73 |
<AnyChar String="qQ" attribute="Command" context="QCommand"/> |
| 74 |
<DetectChar char="{" attribute="Brace" context="BeginningOfLine"/> |
| 75 |
<RegExpr String="\S" attribute="Error" context="Error"/> |
| 76 |
</context> |
| 77 |
|
| 78 |
<context name="SCommand" attribute="Normal" lineEndContext="Error"> |
| 79 |
<DetectSpaces/> |
| 80 |
<RegExpr String="(\S)" attribute="Separator" context="SRegex"/> |
| 81 |
</context> |
| 82 |
|
| 83 |
<context name="SRegex" attribute="Regex" lineEndContext="Error" dynamic="true"> |
| 84 |
<DetectSpaces/> |
| 85 |
<StringDetect String="\%1" attribute="Regex Escape" context="#stay" dynamic="true"/> |
| 86 |
<RegExpr String="(%1)" attribute="Separator" context="SReplacement" dynamic="true"/> |
| 87 |
<IncludeRules context="Regex"/> |
| 88 |
</context> |
| 89 |
|
| 90 |
<context name="SReplacement" attribute="Replacement" lineEndContext="Error" dynamic="true"> |
| 91 |
<DetectSpaces/> |
| 92 |
<StringDetect String="\%1" attribute="Repl Escape" context="#stay" dynamic="true"/> |
| 93 |
<StringDetect String="%1" attribute="Separator" context="SFlags" dynamic="true"/> |
| 94 |
<RegExpr String="\\[0-9LlUuE\\&]" attribute="Repl Escape" context="#stay"/> |
| 95 |
<DetectChar char="&" attribute="Repl Escape" context="#stay"/> |
| 96 |
</context> |
| 97 |
|
| 98 |
<context name="SFlags" attribute="Normal" lineEndContext="BeginningOfLine"> |
| 99 |
<DetectSpaces/> |
| 100 |
<AnyChar String="gpeIiMm" attribute="Flag" context="#stay"/> |
| 101 |
<DetectChar char="w" attribute="Flag" context="WFlag"/> |
| 102 |
<Int attribute="Repl Number" context="#stay"/> |
| 103 |
<IncludeRules context="AfterCommand"/> |
| 104 |
</context> |
| 105 |
|
| 106 |
<context name="WFlag" attribute="Normal" lineEndContext="BeginningOfLine"> |
| 107 |
<DetectSpaces/> |
| 108 |
<RegExpr String="\S+" attribute="Filename" context="SFlags"/> |
| 109 |
</context> |
| 110 |
|
| 111 |
<context name="YCommand" attribute="Normal" lineEndContext="Error"> |
| 112 |
<DetectSpaces/> |
| 113 |
<RegExpr String="(\S)" attribute="Separator" context="YSourceList"/> |
| 114 |
</context> |
| 115 |
|
| 116 |
<context name="YSourceList" attribute="Char List" lineEndContext="Error" dynamic="true"> |
| 117 |
<DetectSpaces/> |
| 118 |
<StringDetect String="\%1" attribute="Char List Escape" context="#stay" dynamic="true"/> |
| 119 |
<RegExpr String="(%1)" attribute="Separator" context="YDestList" dynamic="true"/> |
| 120 |
<Detect2Chars char="\" char1="n" attribute="Char List Escape" context="#stay"/> |
| 121 |
<Detect2Chars char="\" char1="\" attribute="Char List Escape" context="#stay"/> |
| 122 |
</context> |
| 123 |
|
| 124 |
<context name="YDestList" attribute="Char List" lineEndContext="Error" dynamic="true"> |
| 125 |
<DetectSpaces/> |
| 126 |
<StringDetect String="\%1" attribute="Char List Escape" context="#stay" dynamic="true"/> |
| 127 |
<StringDetect String="%1" attribute="Separator" context="AfterCommand" dynamic="true"/> |
| 128 |
<Detect2Chars char="\" char1="n" attribute="Char List Escape" context="#stay"/> |
| 129 |
<Detect2Chars char="\" char1="\" attribute="Char List Escape" context="#stay"/> |
| 130 |
</context> |
| 131 |
|
| 132 |
<context name="AICCommand" attribute="Normal" lineEndContext="Error"> |
| 133 |
<DetectSpaces/> |
| 134 |
<LineContinue attribute="Line Continue" context="LiteralText"/> |
| 135 |
<RegExpr String="\S" attribute="Error" context="Error"/> |
| 136 |
</context> |
| 137 |
|
| 138 |
<context name="LiteralText" attribute="Literal Text" lineEndContext="BeginningOfLine"> |
| 139 |
<Detect2Chars char="\" char1="\" attribute="Literal Escape" context="LiteralText"/> |
| 140 |
<LineContinue attribute="Line Continue" context="LiteralText"/> |
| 141 |
<DetectChar char="\" attribute="Error" context="Error"/> |
| 142 |
</context> |
| 143 |
|
| 144 |
<context name="BTCommand" attribute="Normal" lineEndContext="BeginningOfLine"> |
| 145 |
<DetectSpaces/> |
| 146 |
<RegExpr String="\w+" attribute="Label" context="AfterCommand"/> |
| 147 |
<IncludeRules context="AfterCommand"/> |
| 148 |
</context> |
| 149 |
|
| 150 |
<context name="WRCommand" attribute="Normal" lineEndContext="Error"> |
| 151 |
<DetectSpaces/> |
| 152 |
<RegExpr String="\S+" attribute="Filename" context="AfterCommand"/> |
| 153 |
</context> |
| 154 |
|
| 155 |
<context name="LCommand" attribute="Normal" lineEndContext="BeginningOfLine"> |
| 156 |
<DetectSpaces/> |
| 157 |
<Int attribute="Wrap Length" context="AfterCommand"/> |
| 158 |
<IncludeRules context="AfterCommand"/> |
| 159 |
</context> |
| 160 |
|
| 161 |
<context name="QCommand" attribute="Normal" lineEndContext="BeginningOfLine"> |
| 162 |
<DetectSpaces/> |
| 163 |
<Int attribute="Exit Code" context="AfterCommand"/> |
| 164 |
<IncludeRules context="AfterCommand"/> |
| 165 |
</context> |
| 166 |
|
| 167 |
<context name="Label" attribute="Normal" lineEndContext="Error"> |
| 168 |
<DetectSpaces/> |
| 169 |
<RegExpr String="\w+" attribute="Label" context="AfterCommand"/> |
| 170 |
<RegExpr String="\S" attribute="Error" context="Error"/> |
| 171 |
</context> |
| 172 |
|
| 173 |
<context name="AfterCommand" attribute="Normal" lineEndContext="BeginningOfLine"> |
| 174 |
<DetectSpaces/> |
| 175 |
<DetectChar char=";" attribute="Normal" context="BeginningOfLine"/> |
| 176 |
<DetectChar char="}" attribute="Brace" context="AfterCommand"/> |
| 177 |
<DetectChar char="#" attribute="Comment" context="Comment"/> |
| 178 |
<RegExpr String="\S" attribute="Error" context="Error"/> |
| 179 |
</context> |
| 180 |
|
| 181 |
<context name="Regex" attribute="Regex" lineEndContext="Error"> |
| 182 |
<Detect2Chars char="\" char1="(" attribute="Regex Escape" context="#stay"/> |
| 183 |
<Detect2Chars char="\" char1=")" attribute="Regex Escape" context="#stay"/> |
| 184 |
<Detect2Chars char="\" char1="+" attribute="Regex Escape" context="#stay"/> |
| 185 |
<Detect2Chars char="\" char1="?" attribute="Regex Escape" context="#stay"/> |
| 186 |
<Detect2Chars char="\" char1="|" attribute="Regex Escape" context="#stay"/> |
| 187 |
<Detect2Chars char="\" char1="{" attribute="Regex Escape" context="#stay"/> |
| 188 |
<Detect2Chars char="\" char1="}" attribute="Regex Escape" context="#stay"/> |
| 189 |
<Detect2Chars char="\" char1="[" attribute="Regex Escape" context="#stay"/> |
| 190 |
<Detect2Chars char="\" char1="]" attribute="Regex Escape" context="#stay"/> |
| 191 |
<Detect2Chars char="\" char1="." attribute="Regex Escape" context="#stay"/> |
| 192 |
<Detect2Chars char="\" char1="*" attribute="Regex Escape" context="#stay"/> |
| 193 |
<Detect2Chars char="\" char1="\" attribute="Regex Escape" context="#stay"/> |
| 194 |
<Detect2Chars char="\" char1="^" attribute="Regex Escape" context="#stay"/> |
| 195 |
<Detect2Chars char="\" char1="$" attribute="Regex Escape" context="#stay"/> |
| 196 |
<Detect2Chars char="\" char1="n" attribute="Regex Escape" context="#stay"/> |
| 197 |
<Detect2Chars char="\" char1="t" attribute="Regex Escape" context="#stay"/> |
| 198 |
<Detect2Chars char="\" char1="0" attribute="Regex Escape" context="#stay"/> |
| 199 |
<Detect2Chars char="\" char1="1" attribute="Regex Escape" context="#stay"/> |
| 200 |
<Detect2Chars char="\" char1="2" attribute="Regex Escape" context="#stay"/> |
| 201 |
<Detect2Chars char="\" char1="3" attribute="Regex Escape" context="#stay"/> |
| 202 |
<Detect2Chars char="\" char1="4" attribute="Regex Escape" context="#stay"/> |
| 203 |
<Detect2Chars char="\" char1="5" attribute="Regex Escape" context="#stay"/> |
| 204 |
<Detect2Chars char="\" char1="6" attribute="Regex Escape" context="#stay"/> |
| 205 |
<Detect2Chars char="\" char1="7" attribute="Regex Escape" context="#stay"/> |
| 206 |
<Detect2Chars char="\" char1="8" attribute="Regex Escape" context="#stay"/> |
| 207 |
<Detect2Chars char="\" char1="9" attribute="Regex Escape" context="#stay"/> |
| 208 |
<AnyChar String="*.^$[]" attribute="Regex Escape" context="#stay"/> |
| 209 |
</context> |
| 210 |
|
| 211 |
<context name="Comment" attribute="Comment" lineEndContext="#pop"> |
| 212 |
<DetectSpaces /> |
| 213 |
<IncludeRules context="##Comments"/> |
| 214 |
</context> |
| 215 |
<context name="Error" attribute="Error" lineEndContext="BeginningOfLine"/> |
| 216 |
</contexts> |
| 217 |
|
| 218 |
<itemDatas> |
| 219 |
<itemData name="Normal" defStyleNum="dsNormal"/> |
| 220 |
|
| 221 |
<itemData name="Regex" defStyleNum="dsString"/> |
| 222 |
<itemData name="Regex Escape" defStyleNum="dsChar"/> |
| 223 |
<itemData name="Replacement" defStyleNum="dsString"/> |
| 224 |
<itemData name="Repl Escape" defStyleNum="dsChar"/> |
| 225 |
<itemData name="Char List" defStyleNum="dsString"/> |
| 226 |
<itemData name="Char List Escape" defStyleNum="dsChar"/> |
| 227 |
<itemData name="Separator" defStyleNum="dsString" color="#00F"/> |
| 228 |
|
| 229 |
<itemData name="Line Number" defStyleNum="dsDecVal"/> |
| 230 |
<itemData name="Step" defStyleNum="dsDecVal"/> |
| 231 |
<itemData name="Last Line" defStyleNum="dsOthers" color="#808" bold="1"/> |
| 232 |
<itemData name="Negation" defStyleNum="dsOthers" color="#808" bold="1"/> |
| 233 |
|
| 234 |
<itemData name="Command" defStyleNum="dsKeyword"/> |
| 235 |
<itemData name="Label" defStyleNum="dsFunction"/> |
| 236 |
<itemData name="Brace" defStyleNum="dsNormal"/> |
| 237 |
|
| 238 |
<itemData name="Flag" defStyleNum="dsDataType"/> |
| 239 |
<itemData name="Repl Number" defStyleNum="dsDecVal"/> |
| 240 |
<itemData name="Exit Code" defStyleNum="dsDecVal"/> |
| 241 |
<itemData name="Filename" defStyleNum="dsBaseN"/> |
| 242 |
<itemData name="Wrap Length" defStyleNum="dsDecVal"/> |
| 243 |
|
| 244 |
<itemData name="Line Continue" defStyleNum="dsOthers" color="#000" bold="1"/> |
| 245 |
<itemData name="Literal Text" defStyleNum="dsOthers" color="#080" italic="1"/> |
| 246 |
<itemData name="Literal Escape" defStyleNum="dsOthers" color="#0A0" italic="1"/> |
| 247 |
|
| 248 |
<itemData name="Comment" defStyleNum="dsComment"/> |
| 249 |
<itemData name="Error" defStyleNum="dsError"/> |
| 250 |
</itemDatas> |
| 251 |
</highlighting> |
| 252 |
|
| 253 |
<general> |
| 254 |
<comments> |
| 255 |
<comment name="singleLine" start="#"/> |
| 256 |
</comments> |
| 257 |
</general> |
| 258 |
</language> |
| 259 |
<!-- kate: replace-tabs on; tab-width 8; indent-width 8; --> |