Warning, /frameworks/syntax-highlighting/data/syntax/sed.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language>
0003 <language name="sed" section="Scripts" version="8" kateversion="5.0" extensions="*.sed" mimetype="text/x-sed" author="Bart Sas (bart.sas@gmail.com)" license="GPL">
0004         <highlighting>
0005                 <contexts>
0006                         <context name="BeginningOfLine" attribute="Normal" lineEndContext="#stay">
0007                                 <DetectSpaces/>
0008                                 <DetectChar char="#"     attribute="Comment"     context="Comment"/>
0009                                 <RegExpr String="(?|(/)|\\(\S))" attribute="Separator"   context="FirstAddressRegex"/>
0010                                 <Int                     attribute="Line Number" context="AfterFirstAddress"/>
0011                                 <DetectChar char="$"     attribute="Last Line"   context="AfterFirstAddress"/>
0012                                 <DetectChar char="}"     attribute="Brace"       context="AfterCommand"/>
0013                                 <DetectChar char=":"     attribute="Label"       context="Label"/>
0014                                 <DetectChar char="!"     attribute="Negation"    context="Command"/>
0015                                 <IncludeRules                                    context="Command"/>
0016                         </context>
0017 
0018                         <context name="FirstAddressRegex" attribute="Regex" lineEndContext="Error" dynamic="true">
0019                                 <DetectSpaces/>
0020                                 <StringDetect String="\%1" attribute="Regex Escape" context="#stay"             dynamic="true"/>
0021                                 <StringDetect String="%1"   attribute="Separator"    context="AfterFirstAddress" dynamic="true"/>
0022                                 <IncludeRules                                   context="Regex"/>
0023                         </context>
0024 
0025                         <context name="AfterFirstAddress" attribute="Normal" lineEndContext="BeginningOfLine">
0026                                 <DetectSpaces/>
0027                                 <DetectChar char="!" attribute="Negation" context="Command"/>
0028                                 <IncludeRules                             context="AfterFirstAddress2"/>
0029                         </context>
0030 
0031                         <context name="AfterFirstAddress2" attribute="Normal" lineEndContext="BeginningOfLine">
0032                                 <DetectChar char="," attribute="Normal" context="SecondAddress"/>
0033                                 <DetectChar char="~" attribute="Normal" context="Step"/>
0034                                 <IncludeRules                           context="Command"/>
0035                         </context>
0036 
0037                         <context name="SecondAddress" attribute="Normal" lineEndContext="Error">
0038                                 <DetectSpaces/>
0039                                 <RegExpr String="(?|(/)|\\(\S))" attribute="Separator"   context="SecondAddressRegex"/>
0040                                 <Int                     attribute="Line Number" context="AfterSecondAddress"/>
0041                                 <DetectChar char="$"     attribute="Last Line"   context="AfterSecondAddress"/>
0042                                 <RegExpr String="\S"     attribute="Error"       context="Error"/>
0043                         </context>
0044 
0045                         <context name="SecondAddressRegex" attribute="Regex" lineEndContext="Error" dynamic="true">
0046                                 <DetectSpaces/>
0047                                 <StringDetect String="\%1" attribute="Regex Escape" context="#stay"              dynamic="true"/>
0048                                 <StringDetect String="%1"   attribute="Separator"    context="AfterSecondAddress" dynamic="true"/>
0049                                 <IncludeRules                                   context="Regex"/>
0050                         </context>
0051 
0052                         <context name="AfterSecondAddress" attribute="Normal" lineEndContext="Error" dynamic="true">
0053                                 <DetectSpaces/>
0054                                 <DetectChar char="!" attribute="Negation" context="Command"/>
0055                                 <IncludeRules                             context="Command"/>
0056                         </context>
0057 
0058                         <context name="Step" attribute="Normal" lineEndContext="Error">
0059                                 <DetectSpaces/>
0060                                 <Int                 attribute="Step"  context="Command"/>
0061                                 <RegExpr String="\S" attribute="Error" context="Error"/>
0062                         </context>
0063 
0064                         <context name="Command" attribute="Normal" lineEndContext="Error">
0065                                 <DetectSpaces/>
0066                                 <DetectChar char="s"              attribute="Command" context="SCommand"/>
0067                                 <DetectChar char="y"              attribute="Command" context="YCommand"/>
0068                                 <AnyChar String="dpnDNPhHgGxFvz=" attribute="Command" context="AfterCommand"/>
0069                                 <AnyChar String="aic"             attribute="Command" context="AICCommand"/>
0070                                 <AnyChar String="bTt"             attribute="Command" context="BTCommand"/>
0071                                 <AnyChar String="WwrR"            attribute="Command" context="WRCommand"/>
0072                                 <AnyChar String="lL"              attribute="Command" context="LCommand"/>
0073                                 <AnyChar String="qQ"              attribute="Command" context="QCommand"/>
0074                                 <DetectChar char="{"              attribute="Brace"   context="BeginningOfLine"/>
0075                                 <RegExpr String="\S"              attribute="Error"   context="Error"/>
0076                         </context>
0077 
0078                         <context name="SCommand" attribute="Normal" lineEndContext="Error">
0079                                 <DetectSpaces/>
0080                                 <RegExpr String="(\S)" attribute="Separator" context="SRegex"/>
0081                         </context>
0082 
0083                         <context name="SRegex" attribute="Regex" lineEndContext="Error" dynamic="true">
0084                                 <DetectSpaces/>
0085                                 <StringDetect String="\%1" attribute="Regex Escape" context="#stay"        dynamic="true"/>
0086                                 <RegExpr String="(%1)" attribute="Separator"    context="SReplacement" dynamic="true"/>
0087                                 <IncludeRules                                   context="Regex"/>
0088                         </context>
0089 
0090                         <context name="SReplacement" attribute="Replacement" lineEndContext="Error" dynamic="true">
0091                                 <DetectSpaces/>
0092                                 <StringDetect String="\%1"                attribute="Repl Escape" context="#stay"  dynamic="true"/>
0093                                 <StringDetect String="%1"                  attribute="Separator"   context="SFlags" dynamic="true"/>
0094                                 <RegExpr String="\\[0-9LlUuE\\&amp;]" attribute="Repl Escape" context="#stay"/>
0095                                 <DetectChar char="&amp;"              attribute="Repl Escape" context="#stay"/>
0096                         </context>
0097 
0098                         <context name="SFlags" attribute="Normal" lineEndContext="BeginningOfLine">
0099                                 <DetectSpaces/>
0100                                 <AnyChar String="gpeIiMm" attribute="Flag"        context="#stay"/>
0101                                 <DetectChar char="w"      attribute="Flag"        context="WFlag"/>
0102                                 <Int                      attribute="Repl Number" context="#stay"/>
0103                                 <IncludeRules                                     context="AfterCommand"/>
0104                         </context>
0105 
0106                         <context name="WFlag" attribute="Normal" lineEndContext="BeginningOfLine">
0107                                 <DetectSpaces/>
0108                                 <RegExpr String="\S+" attribute="Filename" context="SFlags"/>
0109                         </context>
0110 
0111                         <context name="YCommand" attribute="Normal" lineEndContext="Error">
0112                                 <DetectSpaces/>
0113                                 <RegExpr String="(\S)" attribute="Separator" context="YSourceList"/>
0114                         </context>
0115 
0116                         <context name="YSourceList" attribute="Char List" lineEndContext="Error" dynamic="true">
0117                                 <DetectSpaces/>
0118                                 <StringDetect String="\%1"           attribute="Char List Escape" context="#stay"     dynamic="true"/>
0119                                 <RegExpr String="(%1)"           attribute="Separator"        context="YDestList" dynamic="true"/>
0120                                 <Detect2Chars char="\" char1="n" attribute="Char List Escape" context="#stay"/>
0121                                 <Detect2Chars char="\" char1="\" attribute="Char List Escape" context="#stay"/>
0122                         </context>
0123 
0124                         <context name="YDestList" attribute="Char List" lineEndContext="Error" dynamic="true">
0125                                 <DetectSpaces/>
0126                                 <StringDetect String="\%1"           attribute="Char List Escape" context="#stay"        dynamic="true"/>
0127                                 <StringDetect String="%1"             attribute="Separator"        context="AfterCommand" dynamic="true"/>
0128                                 <Detect2Chars char="\" char1="n" attribute="Char List Escape" context="#stay"/>
0129                                 <Detect2Chars char="\" char1="\" attribute="Char List Escape" context="#stay"/>
0130                         </context>
0131 
0132                         <context name="AICCommand" attribute="Normal" lineEndContext="Error">
0133                                 <DetectSpaces/>
0134                                 <LineContinue             attribute="Line Continue" context="LiteralText"/>
0135                                 <RegExpr      String="\S" attribute="Error"         context="Error"/>
0136                         </context>
0137 
0138                         <context name="LiteralText" attribute="Literal Text" lineEndContext="BeginningOfLine">
0139                                 <Detect2Chars char="\" char1="\" attribute="Literal Escape" context="LiteralText"/>
0140                                 <LineContinue                    attribute="Line Continue"  context="LiteralText"/>
0141                                 <DetectChar   char="\"           attribute="Error"          context="Error"/>
0142                         </context>
0143 
0144                         <context name="BTCommand" attribute="Normal" lineEndContext="BeginningOfLine">
0145                                 <DetectSpaces/>
0146                                 <RegExpr String="\w+" attribute="Label" context="AfterCommand"/>
0147                                 <IncludeRules                           context="AfterCommand"/>
0148                         </context>
0149 
0150                         <context name="WRCommand" attribute="Normal" lineEndContext="Error">
0151                                 <DetectSpaces/>
0152                                 <RegExpr String="\S+" attribute="Filename" context="AfterCommand"/>
0153                         </context>
0154 
0155                         <context name="LCommand" attribute="Normal" lineEndContext="BeginningOfLine">
0156                                 <DetectSpaces/>
0157                                 <Int attribute="Wrap Length" context="AfterCommand"/>
0158                                 <IncludeRules                context="AfterCommand"/>
0159                         </context>
0160 
0161                         <context name="QCommand" attribute="Normal" lineEndContext="BeginningOfLine">
0162                                 <DetectSpaces/>
0163                                 <Int attribute="Exit Code" context="AfterCommand"/>
0164                                 <IncludeRules              context="AfterCommand"/>
0165                         </context>
0166 
0167                         <context name="Label" attribute="Normal" lineEndContext="Error">
0168                                 <DetectSpaces/>
0169                                 <RegExpr String="\w+" attribute="Label" context="AfterCommand"/>
0170                                 <RegExpr String="\S"  attribute="Error" context="Error"/>
0171                         </context>
0172 
0173                         <context name="AfterCommand" attribute="Normal" lineEndContext="BeginningOfLine">
0174                                 <DetectSpaces/>
0175                                 <DetectChar char=";" attribute="Normal"  context="BeginningOfLine"/>
0176                                 <DetectChar char="}" attribute="Brace"   context="AfterCommand"/>
0177                                 <DetectChar char="#" attribute="Comment" context="Comment"/>
0178                                 <RegExpr String="\S" attribute="Error"   context="Error"/>
0179                         </context>
0180 
0181                         <context name="Regex" attribute="Regex" lineEndContext="Error">
0182                                 <Detect2Chars char="\" char1="(" attribute="Regex Escape" context="#stay"/>
0183                                 <Detect2Chars char="\" char1=")" attribute="Regex Escape" context="#stay"/>
0184                                 <Detect2Chars char="\" char1="+" attribute="Regex Escape" context="#stay"/>
0185                                 <Detect2Chars char="\" char1="?" attribute="Regex Escape" context="#stay"/>
0186                                 <Detect2Chars char="\" char1="|" attribute="Regex Escape" context="#stay"/>
0187                                 <Detect2Chars char="\" char1="{" attribute="Regex Escape" context="#stay"/>
0188                                 <Detect2Chars char="\" char1="}" attribute="Regex Escape" context="#stay"/>
0189                                 <Detect2Chars char="\" char1="[" attribute="Regex Escape" context="#stay"/>
0190                                 <Detect2Chars char="\" char1="]" attribute="Regex Escape" context="#stay"/>
0191                                 <Detect2Chars char="\" char1="." attribute="Regex Escape" context="#stay"/>
0192                                 <Detect2Chars char="\" char1="*" attribute="Regex Escape" context="#stay"/>
0193                                 <Detect2Chars char="\" char1="\" attribute="Regex Escape" context="#stay"/>
0194                                 <Detect2Chars char="\" char1="^" attribute="Regex Escape" context="#stay"/>
0195                                 <Detect2Chars char="\" char1="$" attribute="Regex Escape" context="#stay"/>
0196                                 <Detect2Chars char="\" char1="n" attribute="Regex Escape" context="#stay"/>
0197                                 <Detect2Chars char="\" char1="t" attribute="Regex Escape" context="#stay"/>
0198                                 <Detect2Chars char="\" char1="0" attribute="Regex Escape" context="#stay"/>
0199                                 <Detect2Chars char="\" char1="1" attribute="Regex Escape" context="#stay"/>
0200                                 <Detect2Chars char="\" char1="2" attribute="Regex Escape" context="#stay"/>
0201                                 <Detect2Chars char="\" char1="3" attribute="Regex Escape" context="#stay"/>
0202                                 <Detect2Chars char="\" char1="4" attribute="Regex Escape" context="#stay"/>
0203                                 <Detect2Chars char="\" char1="5" attribute="Regex Escape" context="#stay"/>
0204                                 <Detect2Chars char="\" char1="6" attribute="Regex Escape" context="#stay"/>
0205                                 <Detect2Chars char="\" char1="7" attribute="Regex Escape" context="#stay"/>
0206                                 <Detect2Chars char="\" char1="8" attribute="Regex Escape" context="#stay"/>
0207                                 <Detect2Chars char="\" char1="9" attribute="Regex Escape" context="#stay"/>
0208                                 <AnyChar String="*.^$[]"         attribute="Regex Escape" context="#stay"/>
0209                         </context>
0210 
0211                         <context name="Comment" attribute="Comment" lineEndContext="#pop">
0212                                 <DetectSpaces />
0213                                 <IncludeRules context="##Comments"/>
0214                         </context>
0215                         <context name="Error"   attribute="Error"   lineEndContext="BeginningOfLine"/>
0216                 </contexts>
0217 
0218                 <itemDatas>
0219                         <itemData name="Normal"           defStyleNum="dsNormal"/>
0220 
0221                         <itemData name="Regex"            defStyleNum="dsString"/>
0222                         <itemData name="Regex Escape"     defStyleNum="dsChar"/>
0223                         <itemData name="Replacement"      defStyleNum="dsString"/>
0224                         <itemData name="Repl Escape"      defStyleNum="dsChar"/>
0225                         <itemData name="Char List"        defStyleNum="dsString"/>
0226                         <itemData name="Char List Escape" defStyleNum="dsChar"/>
0227                         <itemData name="Separator"        defStyleNum="dsString" color="#00F"/>
0228 
0229                         <itemData name="Line Number"      defStyleNum="dsDecVal"/>
0230                         <itemData name="Step"             defStyleNum="dsDecVal"/>
0231                         <itemData name="Last Line"        defStyleNum="dsOthers" color="#808" bold="1"/>
0232                         <itemData name="Negation"         defStyleNum="dsOthers" color="#808" bold="1"/>
0233 
0234                         <itemData name="Command"          defStyleNum="dsKeyword"/>
0235                         <itemData name="Label"            defStyleNum="dsFunction"/>
0236                         <itemData name="Brace"            defStyleNum="dsNormal"/>
0237 
0238                         <itemData name="Flag"             defStyleNum="dsDataType"/>
0239                         <itemData name="Repl Number"      defStyleNum="dsDecVal"/>
0240                         <itemData name="Exit Code"        defStyleNum="dsDecVal"/>
0241                         <itemData name="Filename"         defStyleNum="dsBaseN"/>
0242                         <itemData name="Wrap Length"      defStyleNum="dsDecVal"/>
0243 
0244                         <itemData name="Line Continue"    defStyleNum="dsOthers" color="#000" bold="1"/>
0245                         <itemData name="Literal Text"     defStyleNum="dsOthers" color="#080" italic="1"/>
0246                         <itemData name="Literal Escape"   defStyleNum="dsOthers" color="#0A0" italic="1"/>
0247 
0248                         <itemData name="Comment"          defStyleNum="dsComment"/>
0249                         <itemData name="Error"            defStyleNum="dsError"/>
0250                 </itemDatas>
0251         </highlighting>
0252 
0253         <general>
0254                 <comments>
0255                         <comment name="singleLine" start="#"/>
0256                 </comments>
0257         </general>
0258 </language>
0259 <!-- kate: replace-tabs on; tab-width 8; indent-width 8; -->