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 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language[
<!ENTITY ident "[-_a-zA-Z0-9]+">
<!ENTITY deplist "[^$|:]+">
]>
<language
name="Ninja" section="Other"
version="3" kateversion="5.0"
extensions="*.ninja"
author="Jonathan Poelen (jonathan.poelen@gmail.com)" license="MIT"
>
<highlighting>
<list name="keywords">
<item>rule</item>
<item>build</item>
<item>pool</item>
<item>default</item>
<item>include</item>
<item>subninja</item>
</list>
<list name="other keywords">
<item>console</item>
<item>phony</item>
<item>depth</item>
</list>
<list name="topVariables">
<item>builddir</item>
<item>ninja_required_version</item>
</list>
<list name="ruleVariables">
<item>command</item>
<item>console</item>
<item>depfile</item>
<item>deps</item>
<item>msvc_deps_prefix</item>
<item>description</item>
<item>dyndep</item>
<item>generator</item>
<item>in</item>
<item>in_newline</item>
<item>out</item>
<item>pool</item>
<item>restat</item>
<item>rspfile</item>
<item>rspfile_content</item>
</list>
<contexts>
<context attribute="Normal" name="Normal" lineEndContext="#stay" fallthrough="1" fallthroughContext="ErrorOrComment">
<DetectChar attribute="Comment" context="Comment" char="#"/>
<WordDetect attribute="Keyword" context="BuildStatement" String="build"/>
<WordDetect attribute="Keyword" context="RuleStatement" String="rule"/>
<WordDetect attribute="Keyword" context="PoolStatement" String="pool"/>
<keyword attribute="Keyword" context="SimpleStatement" String="keywords"/>
<keyword attribute="Special Key" context="VariableAssignment" String="topVariables"/>
<RegExpr attribute="Key" context="VariableAssignment" String="&ident;"/>
</context>
<context attribute="Normal" name="ErrorOrComment" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop!Error">
<DetectSpaces/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
</context>
<context attribute="Error" name="Error" lineEndContext="#pop"/>
<!-- rule -->
<context attribute="Normal" name="RuleStatement" lineEndContext="#pop" fallthrough="1" fallthroughContext="Error">
<DetectSpaces/>
<RegExpr attribute="Normal" context="#pop!RuleKeys" String="&ident;"/>
</context>
<context attribute="Normal" name="RuleKeys" lineEndContext="#stay" fallthrough="1" fallthroughContext="#pop">
<DetectSpaces context="RuleKey"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
</context>
<context attribute="Normal" name="RuleKey" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop!Error">
<DetectChar attribute="Comment" context="#pop!Comment" char="#"/>
<WordDetect attribute="Special Key" context="#pop!PoolVariableAssignment" String="pool"/>
<keyword attribute="Special Key" context="#pop!RuleVariableAssignment" String="ruleVariables"/>
</context>
<context attribute="Normal" name="RuleVariableAssignment" lineEndContext="#pop" fallthrough="1" fallthroughContext="Error">
<DetectSpaces/>
<DetectChar attribute="Operator" context="#pop!RuleValue" char="="/>
</context>
<context attribute="Normal" name="RuleValue" lineEndContext="#pop">
<DetectSpaces/>
<DetectChar attribute="Normal" context="RuleDollar" char="$" lookAhead="true"/>
<AnyChar attribute="Symbol" context="#stay" String="<>&|=(){}[]"';!%?*"/>
<RegExpr attribute="Normal" context="#stay" String="[^<>&|=(){}[\]"';!%?*$]"/>
</context>
<context attribute="Error" name="RuleDollar" lineEndContext="#pop">
<LineContinue attribute="Line Continuation" context="#pop!LineContinuation" char="$"/>
<Detect2Chars attribute="Special Char" context="#pop" char="$" char1=" "/>
<Detect2Chars attribute="Special Char" context="#pop" char="$" char1="$"/>
<Detect2Chars attribute="Special Char" context="#pop" char="$" char1=":"/>
<Detect2Chars attribute="Variable Delimiter" context="#pop!RuleOpenVariableName" char="$" char1="{"/>
<DetectChar attribute="Variable Delimiter" context="#pop!RuleVariableName" char="$"/>
</context>
<context attribute="Variable" name="RuleOpenVariableName" lineEndContext="#pop" fallthrough="1" fallthroughContext="Error">
<DetectChar attribute="Variable Delimiter" context="#pop" char="}"/>
<keyword attribute="Special Variable" context="#stay" String="ruleVariables"/>
<RegExpr attribute="Variable" context="#stay" String="&ident;"/>
</context>
<context attribute="Variable" name="RuleVariableName" lineEndContext="#pop" fallthrough="1" fallthroughContext="Error">
<keyword attribute="Special Variable" context="#pop" String="ruleVariables"/>
<RegExpr attribute="Variable" context="#pop" String="&ident;"/>
</context>
<!-- build -->
<context attribute="Normal" name="BuildStatement" lineEndContext="#pop">
<DetectSpaces/>
<DetectChar attribute="Normal" context="Dollar" char="$" lookAhead="true"/>
<DetectChar attribute="Operator" context="#pop!BuildRuleName" char=":"/>
<DetectChar attribute="Operator" context="#pop!ImplicitOutput" char="|"/>
<RegExpr attribute="Normal" context="#stay" String="&deplist;"/>
</context>
<context attribute="Implicit Output" name="ImplicitOutput" lineEndContext="#pop">
<DetectSpaces/>
<DetectChar attribute="Normal" context="Dollar" char="$" lookAhead="true"/>
<DetectChar attribute="Operator" context="#pop!BuildRuleName" char=":"/>
<RegExpr attribute="Implicit Output" context="#stay" String="&deplist;"/>
</context>
<context attribute="Normal" name="BuildRuleName" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop!Error">
<DetectSpaces/>
<WordDetect attribute="Special Rule Name" context="#pop!BuildDependancies" String="phony"/>
<RegExpr attribute="Rule Name" context="#pop!BuildDependancies" String="&ident;"/>
</context>
<context attribute="Dependancy" name="BuildDependancies" lineEndContext="#pop!BuildKeys">
<DetectSpaces/>
<DetectChar attribute="Normal" context="Dollar" char="$" lookAhead="true"/>
<Detect2Chars attribute="Operator" context="#pop!ImplicitBuildDependancies" char="|" char1="@"/>
<DetectChar attribute="Operator" context="#pop!ImplicitBuildDependancies" char="|"/>
<DetectChar attribute="Error" context="#stay" char=":"/>
<RegExpr attribute="Dependancy" context="#stay" String="&deplist;"/>
</context>
<context attribute="Implicit Dependancy" name="ImplicitBuildDependancies" lineEndContext="#pop!BuildKeys">
<DetectSpaces/>
<DetectChar attribute="Normal" context="Dollar" char="$" lookAhead="true"/>
<Detect2Chars attribute="Operator" context="#stay" char="|" char1="@"/>
<DetectChar attribute="Operator" context="#stay" char="|"/>
<DetectChar attribute="Error" context="#stay" char=":"/>
<RegExpr attribute="Implicit Dependancy" context="#stay" String="&deplist;"/>
</context>
<context attribute="Normal" name="BuildKeys" lineEndContext="#stay" fallthrough="1" fallthroughContext="#pop">
<DetectSpaces context="BuildKey"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
</context>
<context attribute="Normal" name="BuildKey" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop!Error">
<DetectChar attribute="Comment" context="#pop!Comment" char="#"/>
<WordDetect attribute="Special Key" context="#pop!PoolVariableAssignment" String="pool"/>
<keyword attribute="Special Key" context="#pop!VariableAssignment" String="ruleVariables"/>
<RegExpr attribute="Key" context="#pop!VariableAssignment" String="&ident;"/>
</context>
<!-- pool -->
<context attribute="Normal" name="PoolStatement" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop!Error">
<DetectSpaces/>
<RegExpr attribute="Normal" context="#pop!PoolKeys" String="&ident;"/>
</context>
<context attribute="Normal" name="PoolKeys" lineEndContext="#stay" fallthrough="1" fallthroughContext="#pop">
<DetectSpaces context="PoolKey"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
</context>
<context attribute="Normal" name="PoolKey" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop!Error">
<DetectChar attribute="Comment" context="#pop!Comment" char="#"/>
<WordDetect attribute="Special Key" context="#pop!PoolVariableAssignment" String="depth"/>
</context>
<context attribute="Normal" name="PoolVariableAssignment" lineEndContext="#pop" fallthrough="1" fallthroughContext="Error">
<DetectSpaces/>
<DetectChar attribute="Operator" context="#pop!PoolValue" char="="/>
</context>
<context attribute="Normal" name="PoolValue" lineEndContext="#pop">
<DetectSpaces/>
<DetectChar attribute="Normal" context="Dollar" char="$" lookAhead="true"/>
<WordDetect attribute="Special Value" context="BuildStatement" String="console"/>
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
</context>
<!-- default, include, subninja -->
<context attribute="Normal" name="SimpleStatement" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop!Error">
<DetectChar attribute="Normal" context="Dollar" char="$" lookAhead="true"/>
<RegExpr attribute="Normal" context="#stay" String="&deplist;"/>
</context>
<!-- Value -->
<context attribute="Normal" name="VariableAssignment" lineEndContext="#pop" fallthrough="1" fallthroughContext="Error">
<DetectSpaces/>
<DetectChar attribute="Operator" context="#pop!Value" char="="/>
</context>
<context attribute="Normal" name="Value" lineEndContext="#pop">
<DetectSpaces/>
<DetectChar attribute="Normal" context="Dollar" char="$" lookAhead="true"/>
<AnyChar attribute="Symbol" context="#stay" String="<>&|=(){}[]"';!%?*"/>
<RegExpr attribute="Normal" context="#stay" String="[^<>&|=(){}[\]"';!%?*$]"/>
</context>
<!-- $ -->
<context attribute="Error" name="Dollar" lineEndContext="#pop">
<LineContinue attribute="Line Continuation" context="#pop!LineContinuation" char="$"/>
<Detect2Chars attribute="Special Char" context="#pop" char="$" char1=" "/>
<Detect2Chars attribute="Special Char" context="#pop" char="$" char1="$"/>
<Detect2Chars attribute="Special Char" context="#pop" char="$" char1=":"/>
<Detect2Chars attribute="Variable Delimiter" context="#pop!OpenVariableName" char="$" char1="{"/>
<DetectChar attribute="Variable Delimiter" context="#pop!VariableName" char="$"/>
</context>
<context attribute="Variable" name="OpenVariableName" lineEndContext="#pop" fallthrough="1" fallthroughContext="Error">
<DetectChar attribute="Variable Delimiter" context="#pop" char="}"/>
<RegExpr attribute="Variable" context="#stay" String="&ident;"/>
</context>
<context attribute="Variable" name="VariableName" lineEndContext="#pop" fallthrough="1" fallthroughContext="Error">
<RegExpr attribute="Variable" context="#pop" String="&ident;"/>
</context>
<context attribute="Line Continuation" name="LineContinuation" lineEndContext="#pop" fallthrough="1" fallthroughContext="#pop">
<DetectSpaces/>
</context>
<!-- comment -->
<context attribute="Comment" lineEndContext="#pop" name="Comment">
<DetectSpaces/>
<IncludeRules context="##Comments" />
<DetectIdentifier attribute="Comment" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal" defStyleNum="dsNormal" spellChecking="0"/>
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="0"/>
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Rule Name" defStyleNum="dsFunction" spellChecking="0"/>
<itemData name="Special Rule Name" defStyleNum="dsBuiltIn" spellChecking="0"/>
<itemData name="Dependancy" defStyleNum="dsNormal" spellChecking="0"/>
<itemData name="Implicit Dependancy" defStyleNum="dsNormal" italic="1" spellChecking="0"/>
<itemData name="Implicit Output" defStyleNum="dsNormal" italic="1" spellChecking="0"/>
<itemData name="Special Key" defStyleNum="dsBuiltIn" spellChecking="0"/>
<itemData name="Key" defStyleNum="dsVariable" spellChecking="0"/>
<itemData name="Variable Delimiter" defStyleNum="dsOperator" spellChecking="0"/>
<itemData name="Special Variable" defStyleNum="dsBuiltIn" spellChecking="0"/>
<itemData name="Variable" defStyleNum="dsVariable" spellChecking="0"/>
<itemData name="Special Value" defStyleNum="dsBuiltIn" spellChecking="0"/>
<itemData name="Operator" defStyleNum="dsOperator" spellChecking="0"/>
<itemData name="Line Continuation" defStyleNum="dsSpecialChar" spellChecking="0"/>
<itemData name="Special Char" defStyleNum="dsSpecialChar" spellChecking="0"/>
<itemData name="Symbol" defStyleNum="dsNormal" bold="1" spellChecking="0"/>
<itemData name="Error" defStyleNum="dsError" spellChecking="0"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="#"/>
</comments>
</general>
</language>
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
|