595 lines
28 KiB
XML
595 lines
28 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE language
|
|
[
|
|
<!ENTITY ident "([^\t $"\\]+|\$(?!\()|\\.)+">
|
|
]>
|
|
<!--
|
|
Documentation:
|
|
https://www.bfgroup.xyz/b2/manual/release/index.html
|
|
-->
|
|
|
|
<!--
|
|
Copyright (C) 2006 Mildred <silkensedai@online.fr>.
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to
|
|
deal in the Software without restriction, including without limitation the
|
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
sell copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
IN THE SOFTWARE.
|
|
-->
|
|
<language name="Jam" version="13" kateversion="5.79" section="Other" extensions="Jam*;*.jam" mimetype="text/x-jam;text/x-Jamfile;text/x-Jamrules;text/x-Jambase" author="Mildred (silkensedai@online.fr)" license="MIT">
|
|
<!--
|
|
Changelog
|
|
0.2
|
|
* now tokens like [ ] { } ( ) : ; are not detected if there is no whitespace before and after
|
|
* Jam* files are handled (example Jamrules or Jambase)
|
|
* different colors
|
|
* Subvariables are handled (example : $(varname[$(v)])
|
|
* Include bash highlighting inside actions blocks
|
|
* rules names are found in rules definitions
|
|
* highlight the variable reference in rule definitions after 'bind'
|
|
0.3
|
|
* because weakDelimiter isn't supported, it is not possible to just have some locals delimiters for the tokens and globals delimiters as default. So it's not possible to have our usual double click to select.
|
|
* 'actions action_name bind var' instead of 'actions bind var action_name'
|
|
* bun in syntax 'rule Rulename : param param ...' ':' is not recognized. fixed
|
|
* fixed some bugs found when looking at Jambase (peacemeal -> piecemeal, ...)
|
|
* variables recognized in strings
|
|
* named parameters for rules ... the syntax has changed : 'rule rulename param : param : param {'
|
|
* changed section from Scripts to Other
|
|
Feature request to Kate dev.
|
|
* returnContext attribute
|
|
* ability to enter a new context after a #pop
|
|
* when you include rules from foreign contexts (here Bash), having the ability to prepend some rules to all foreign contexts for example to terminate the included context before it naturally ends.
|
|
|
|
0.4
|
|
* fix `x=`: is a rule named `x=`, not a variable
|
|
* fix `exe onxxxxx`: is a rule call, not a variable
|
|
* fix `ifxxx`, `rulexxx`, etc: not keywords
|
|
* fix `variable default = xxx ;`
|
|
* fix keywords and operators in a condition: they must be separated by spaces
|
|
* fix `on target`
|
|
* fix `switch`
|
|
* fix `class` and `module`
|
|
* fix `for local x`
|
|
* new styles: Feature and FeatureOperator for `<xxx>`, `-<xxx>`, `<xxx>abc:<yyy>abc`, `<xxx>abc/<yyy>abc`, `<xxx>abc&&def`
|
|
* don't use black color in Rule
|
|
|
|
v5
|
|
* fix `local x ;`, `x` is a variable not a rule
|
|
* highlight subrule: `exe x : [ glob *.cpp ]`
|
|
-->
|
|
<highlighting>
|
|
<list name="keywords">
|
|
<item>break</item>
|
|
<item>continue</item>
|
|
<item>else</item>
|
|
</list>
|
|
<list name="keywordIf">
|
|
<item>if</item>
|
|
<item>while</item>
|
|
</list>
|
|
<list name="keywordAcceptRule">
|
|
<item>include</item>
|
|
<item>return</item>
|
|
</list>
|
|
<list name="keywordClass"><item>class</item></list>
|
|
<list name="keywordModule"><item>module</item></list>
|
|
<list name="keywordSwitch"><item>switch</item></list>
|
|
<list name="keywordActions"><item>actions</item></list>
|
|
<list name="keywordRule"><item>rule</item></list>
|
|
<list name="keywordFor"><item>for</item></list>
|
|
<list name="keywordOn"><item>on</item></list>
|
|
<list name="keywordReturn"><item>return</item></list>
|
|
<list name="keywordIn"><item>in</item></list>
|
|
<list name="keywordCase"><item>case</item></list>
|
|
<list name="keywordLocal"><item>local</item></list>
|
|
|
|
<list name="actionAttribute">
|
|
<item>existing</item>
|
|
<item>ignore</item>
|
|
<item>piecemeal</item>
|
|
<item>quietly</item>
|
|
<item>together</item>
|
|
<item>updated</item>
|
|
</list>
|
|
<list name="actionAttributeBind">
|
|
<item>bind</item>
|
|
</list>
|
|
|
|
<list name="onTarget"><item>target</item></list>
|
|
|
|
<list name="features">
|
|
<item><address-model></item>
|
|
<item><address-sanitizer></item>
|
|
<item><allow-system-cflags></item>
|
|
<item><allow-system-libs></item>
|
|
<item><architecture></item>
|
|
<item><archiver></item>
|
|
<item><asciidoctor-attribute></item>
|
|
<item><asciidoctor-backend></item>
|
|
<item><asciidoctor-doctype></item>
|
|
<item><assembler></item>
|
|
<item><boostbook></item>
|
|
<item><build></item>
|
|
<item><build-name></item>
|
|
<item><c++-template-depth></item>
|
|
<item><catalog></item>
|
|
<item><cflags></item>
|
|
<item><compileflags></item>
|
|
<item><compiler></item>
|
|
<item><compiler-filter></item>
|
|
<item><cxxflags></item>
|
|
<item><debug-symbols></item>
|
|
<item><def-file></item>
|
|
<item><define></item>
|
|
<item><dll-path></item>
|
|
<item><doxygen:param></item>
|
|
<item><doxygen:xml-imagedir></item>
|
|
<item><embed-manifest></item>
|
|
<item><embed-manifest-file></item>
|
|
<item><file></item>
|
|
<item><format></item>
|
|
<item><hardcode-dll-paths></item>
|
|
<item><idl-compiler></item>
|
|
<item><implicit-dependency></item>
|
|
<item><import></item>
|
|
<item><include></item>
|
|
<item><includes></item>
|
|
<item><inlining></item>
|
|
<item><install-dependencies></item>
|
|
<item><install-source-root></item>
|
|
<item><install-type></item>
|
|
<item><instruction-set></item>
|
|
<item><libdir></item>
|
|
<item><library></item>
|
|
<item><link></item>
|
|
<item><linker></item>
|
|
<item><linkflags></item>
|
|
<item><local-visibility></item>
|
|
<item><location></item>
|
|
<item><location-prefix></item>
|
|
<item><mc-compiler></item>
|
|
<item><name></item>
|
|
<item><optimization></item>
|
|
<item><parallelism></item>
|
|
<item><path></item>
|
|
<item><pkg-config></item>
|
|
<item><pkg-config-define></item>
|
|
<item><prefix></item>
|
|
<item><profiling></item>
|
|
<item><ranlib></item>
|
|
<item><rc></item>
|
|
<item><rc-type></item>
|
|
<item><reftitle></item>
|
|
<item><relevant></item>
|
|
<item><resource-compiler></item>
|
|
<item><root></item>
|
|
<item><runtime-debugging></item>
|
|
<item><runtime-link></item>
|
|
<item><sass-line-numbers></item>
|
|
<item><sass-style></item>
|
|
<item><search></item>
|
|
<item><setup></item>
|
|
<item><setup-amd64></item>
|
|
<item><setup-i386></item>
|
|
<item><setup-ia64></item>
|
|
<item><source></item>
|
|
<item><sysroot></item>
|
|
<item><target-os></item>
|
|
<item><testing.arg></item>
|
|
<item><testing.launcher></item>
|
|
<item><thread-sanitizer></item>
|
|
<item><threading></item>
|
|
<item><toolset></item>
|
|
<item><undefined-sanitizer></item>
|
|
<item><use></item>
|
|
<item><variable></item>
|
|
<item><variant></item>
|
|
<item><verbatim-options></item>
|
|
<item><version></item>
|
|
<item><visibility></item>
|
|
<item><warnings></item>
|
|
<item><warnings-as-errors></item>
|
|
<item><xsl:param></item>
|
|
<item><xsl:path></item>
|
|
<item><xslt></item>
|
|
<item><xslt-dir></item>
|
|
</list>
|
|
|
|
<contexts>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="Normal">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Error" context="#stay" String="}" endRegion="block"/>
|
|
<IncludeRules context="Statement"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="Block">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#pop" String="}" endRegion="block"/>
|
|
<IncludeRules context="Statement"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="Statement">
|
|
<IncludeRules context="Preprocess"/>
|
|
<keyword attribute="Keyword" context="ActionDefinition" String="keywordActions"/>
|
|
<keyword attribute="Keyword" context="RuleDefinition" String="keywordRule"/>
|
|
<keyword attribute="Keyword" context="ForStatement" String="keywordFor"/>
|
|
<keyword attribute="Keyword" context="IfStatement" String="keywordIf"/>
|
|
<keyword attribute="Keyword" context="Rule" String="keywordAcceptRule"/>
|
|
<keyword attribute="Keyword" context="OnPreStment" String="keywordOn"/>
|
|
<keyword attribute="Keyword" context="SwitchStatement" String="keywordSwitch"/>
|
|
<keyword attribute="Keyword" context="ClassStatement" String="keywordClass"/>
|
|
<keyword attribute="Keyword" context="ModuleStatement" String="keywordModule"/>
|
|
<keyword attribute="Keyword" context="#stay" String="keywords"/>
|
|
<keyword attribute="Keyword" context="Local" String="keywordLocal"/>
|
|
<WordDetect attribute="Operator" context="Block" String="{" beginRegion="block"/>
|
|
<RegExpr attribute="VarAssign" context="Assignment" String="[^\t ]+[\t ]+(?=([+?]?=|on|default)([\t ]|$))" />
|
|
<RegExpr attribute="Rule" context="Rule" String="([^\t ][^\t ]+|[^{}\t ])"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="FindBlank">
|
|
<DetectSpaces attribute="Normal"/>
|
|
<Detect2Chars attribute="CommentTitle" context="CommentTitle" char="#" char1="#"/>
|
|
<Detect2Chars attribute="Comment" context="CommentBlock" char="#" char1="|"/>
|
|
<DetectChar attribute="Comment" context="Comment" char="#"/>
|
|
</context>
|
|
|
|
<!-- General instructions -->
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="Rule">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#stay" String=":"/>
|
|
<WordDetect attribute="Operator" context="#pop" String=";"/>
|
|
<IncludeRules context="ValueIdentifier"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ValueIdentifier">
|
|
<DetectChar attribute="Feature" context="Feature" char="<"/>
|
|
<RegExpr attribute="FeatureOperator" context="#stay" String="-(?=<)"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="([^\t $&"\\]+|\$(?!\()|&(?!&)|\\.)+"/>
|
|
<!-- auto-completion only -->
|
|
<keyword attribute="Feature" context="#stay" String="features"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#pop" name="Feature" fallthroughContext="#pop">
|
|
<AnyChar attribute="Error" context="#pop" String="	 " />
|
|
<DetectChar attribute="Feature" context="#pop!Property" char=">"/>
|
|
<Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
|
|
<DetectChar attribute="String" context="String" char="""/>
|
|
<RegExpr attribute="Feature" context="#stay" String="([^\t $>"#\\]+|\$(?!\()|\\.)+"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#pop" name="Property" fallthroughContext="#pop">
|
|
<AnyChar attribute="Normal" context="#pop" String="	 " />
|
|
<Detect2Chars attribute="FeatureOperator" context="#pop" char="&" char1="&"/>
|
|
<Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
|
|
<DetectChar attribute="String" context="String" char="""/>
|
|
<RegExpr attribute="FeatureOperator" context="#pop!PropertyFeature" String="[:/,](?=[<\t ]|$)"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="([^\t $:&":/,#\\]+|\$(?!\()|&(?!&)|[:/,](?!<)|\\.)+"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#pop" name="PropertyFeature" fallthroughContext="#pop">
|
|
<DetectChar attribute="Feature" context="#pop!Feature" char="<"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="OnPreStment" fallthroughContext="#pop">
|
|
<DetectSpaces/>
|
|
<keyword attribute="Keyword" context="OnTargetPreStment" String="onTarget"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="OnTargetPreStment" fallthroughContext="#pop">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#stay" String=":"/>
|
|
<WordDetect attribute="Operator" context="#pop#pop" String=";"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ClassStatement">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#pop!ClassStatement2" String="{" beginRegion="block"/>
|
|
<WordDetect attribute="Operator" context="#stay" String=":"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ModuleStatement">
|
|
<DetectSpaces/>
|
|
<RegExpr attribute="Normal" context="#pop" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ClassStatement2">
|
|
<IncludeRules context="FindBlank"/>
|
|
<WordDetect attribute="Operator" context="#pop" String="}" endRegion="block"/>
|
|
<keyword attribute="Keyword" context="MethodDefinition" String="keywordRule"/>
|
|
<RegExpr attribute="Error" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="MethodDefinition">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Error" context="#stay" String=":"/>
|
|
<WordDetect attribute="Operator" context="MethodDefinition2" String="{" beginRegion="block"/>
|
|
<RegExpr attribute="Rule" context="VarnameList" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="MethodDefinition2">
|
|
<DetectSpaces/>
|
|
<WordDetect attribute="Operator" context="#pop#pop" String="}" endRegion="block"/>
|
|
<IncludeRules context="Statement"/>
|
|
</context>
|
|
|
|
<!-- Assignment -->
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="Assignment">
|
|
<DetectChar attribute="Operator" context="Assignment2" char="="/>
|
|
<Detect2Chars attribute="Operator" context="Assignment2" char="+" char1="="/>
|
|
<Detect2Chars attribute="Operator" context="Assignment2" char="?" char1="="/>
|
|
<Detect2Chars attribute="Operator" context="AssignmentOn" char="o" char1="n"/>
|
|
<StringDetect attribute="Keyword" context="AssignmentDefault" String="default"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="Assignment2">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#pop#pop" String=";"/>
|
|
<IncludeRules context="ValueIdentifier"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="AssignmentOn">
|
|
<IncludeRules context="Preprocess"/>
|
|
<DetectChar attribute="Operator" context="#pop!Assignment2" char="="/>
|
|
<Detect2Chars attribute="Operator" context="#pop!Assignment2" char="+" char1="="/>
|
|
<Detect2Chars attribute="Operator" context="#pop!Assignment2" char="?" char1="="/>
|
|
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Error" lineEndContext="#stay" name="AssignmentDefault">
|
|
<DetectSpaces attribute="Normal"/>
|
|
<DetectChar attribute="Operator" context="#pop!Assignment2" char="="/>
|
|
</context>
|
|
|
|
<!-- Sub statements -->
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="SubStatement" fallthroughContext="SubRule">
|
|
<DetectSpaces/>
|
|
<Detect2Chars attribute="Keyword" context="OnSubStatement" char="o" char1="n"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="OnSubStatement" fallthroughContext="OnSubStatement2">
|
|
<DetectSpaces/>
|
|
<keyword attribute="Keyword" context="#pop!SubRule" String="onTarget"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="OnSubStatement2">
|
|
<IncludeRules context="Preprocess"/>
|
|
<keyword attribute="Keyword" context="#stay" String="keywordReturn"/>
|
|
<WordDetect attribute="Operator" context="#stay" String=":"/>
|
|
<WordDetect attribute="Operator" context="#pop#pop#pop" String="]"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="SubRule" fallthroughContext="#pop!SubRuleParam">
|
|
<DetectSpaces/>
|
|
<RegExpr attribute="Rule" context="#pop!SubRuleParam" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="SubRuleParam">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#stay" String=":"/>
|
|
<WordDetect attribute="Operator" context="#pop#pop" String="]"/>
|
|
<RegExpr attribute="Feature" context="Property" String="<[^\t >]+>"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
|
|
<!-- auto-completion only -->
|
|
<keyword attribute="Feature" context="#stay" String="features"/>
|
|
</context>
|
|
|
|
<!-- Actions, Rules definitions -->
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ActionDefinition">
|
|
<IncludeRules context="Preprocess"/>
|
|
<keyword attribute="Error" context="#stay" String="actionAttributeBind"/>
|
|
<keyword attribute="actionAttribute" context="#stay" String="actionAttribute"/>
|
|
<WordDetect attribute="Operator" context="ActionBody" String="{" beginRegion="block"/>
|
|
<RegExpr attribute="Action" context="ActionDefinitionFull" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Error" lineEndContext="#stay" name="ActionDefinitionFull">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
|
|
<keyword attribute="actionAttribute" context="ActionDefinitionBind" String="actionAttributeBind"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ActionDefinitionBind">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
|
|
<RegExpr attribute="Varname" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ActionBody" fallthroughContext="Command##Bash">
|
|
<WordDetect attribute="Operator" context="#pop#pop" String="}" endRegion="block"/>
|
|
<IncludeRules context="##Bash"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="RuleDefinition">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Error" context="#stay" String=":"/>
|
|
<WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
|
|
<RegExpr attribute="Rule" context="VarnameList" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="VarnameList">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="VarnameList" String=":"/>
|
|
<WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
|
|
<AnyChar attribute="VariableAttribute" context="#stay" String="?+*"/>
|
|
<RegExpr attribute="Varname" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<!-- for, while, if, switch -->
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ForStatement" fallthroughContext="#pop!ForStatement2">
|
|
<DetectSpaces/>
|
|
<keyword attribute="Keyword" context="#pop!ForStatement2" String="keywordLocal"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ForStatement2">
|
|
<IncludeRules context="Preprocess"/>
|
|
<keyword attribute="Operator" context="ForList" String="keywordIn"/>
|
|
<RegExpr attribute="Varname" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="ForList">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#pop#pop" String="{" lookAhead="true"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="IfStatement">
|
|
<IncludeRules context="Preprocess"/>
|
|
<RegExpr attribute="Operator" context="#stay" String="([=<>!]?=|[<>!()]|&&|\|\||in)(?=[ \t]|$)"/>
|
|
<WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
|
|
<RegExpr attribute="Feature" context="Property" String="<[^\t >]+>"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
|
|
<!-- auto-completion only -->
|
|
<keyword attribute="Feature" context="#stay" String="features"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="SwitchStatement">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#pop!SwitchStatement2" String="{" beginRegion="block"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="SwitchStatement2">
|
|
<IncludeRules context="FindBlank"/>
|
|
<WordDetect attribute="Operator" context="#pop" String="}" endRegion="block"/>
|
|
<keyword attribute="Operator" context="CaseCond" String="keywordCase"/>
|
|
<RegExpr attribute="Error" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="CaseCond">
|
|
<IncludeRules context="FindBlank"/>
|
|
<WordDetect attribute="Operator" context="#pop!CaseStatement" String=":"/>
|
|
<WordDetect attribute="Error" context="#pop" String=";"/>
|
|
<RegExpr attribute="Normal" context="#stay" String="&ident;"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="CaseStatement">
|
|
<IncludeRules context="Preprocess"/>
|
|
<WordDetect attribute="Operator" context="#stay" String=":"/>
|
|
<WordDetect attribute="Operator" context="#pop" String=";"/>
|
|
<IncludeRules context="ValueIdentifier"/>
|
|
</context>
|
|
|
|
<!-- local -->
|
|
|
|
<context attribute="Variable" lineEndContext="#stay" name="Local">
|
|
<DetectSpaces attribute="Normal"/>
|
|
<keyword attribute="Keyword" context="#pop!RuleDefinition" String="keywordRule"/>
|
|
<RegExpr attribute="VarAssign" context="#pop!LocalInit" String="&ident;"/>
|
|
<WordDetect attribute="Operator" context="#pop" String=";"/>
|
|
</context>
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="LocalInit" fallthroughContext="#pop">
|
|
<DetectSpaces attribute="Normal"/>
|
|
<DetectChar attribute="Operator" context="Assignment2" char="="/>
|
|
<WordDetect attribute="Operator" context="#pop" String=";"/>
|
|
</context>
|
|
|
|
<!-- Variables, Strings, Comments -->
|
|
|
|
<context attribute="Normal" lineEndContext="#stay" name="Preprocess">
|
|
<IncludeRules context="FindBlank"/>
|
|
<Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
|
|
<DetectChar attribute="String" context="String" char="""/>
|
|
<WordDetect attribute="Operator" context="SubStatement" String="["/>
|
|
</context>
|
|
|
|
<context attribute="Variable" lineEndContext="Error" name="Variable">
|
|
<Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
|
|
<DetectChar attribute="VariableDelimiter" context="#pop" char=")"/>
|
|
<DetectChar attribute="VariableAttribute" context="VariableRange" char="["/>
|
|
<DetectChar attribute="VariableAttribute" context="VariableAttribute" char=":"/>
|
|
</context>
|
|
|
|
<context attribute="VariableAttribute" lineEndContext="Error" name="VariableRange">
|
|
<Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
|
|
<DetectChar attribute="VariableAttribute" context="#pop" char="]"/>
|
|
</context>
|
|
|
|
<context attribute="VariableAttribute" lineEndContext="Error" name="VariableAttribute">
|
|
<Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
|
|
<DetectChar attribute="Variable" context="#pop" char=")" lookAhead="true"/>
|
|
</context>
|
|
|
|
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
|
<DetectSpaces/>
|
|
<IncludeRules context="##Comments" />
|
|
<DetectIdentifier/>
|
|
</context>
|
|
|
|
<context attribute="Comment" lineEndContext="#stay" name="CommentBlock">
|
|
<Detect2Chars attribute="Comment" context="#pop" char="|" char1="#"/>
|
|
<IncludeRules context="Comment"/>
|
|
</context>
|
|
|
|
<context attribute="CommentTitle" lineEndContext="#pop" name="CommentTitle">
|
|
<IncludeRules context="Comment"/>
|
|
</context>
|
|
|
|
<context attribute="String" lineEndContext="#stay" name="String">
|
|
<Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
|
|
<Detect2Chars attribute="EscapeSeq" context="#stay" char="\" char1="""/>
|
|
<DetectChar attribute="EscapeSeq" context="#stay" char="\"/>
|
|
<DetectChar attribute="String" context="#pop" char="""/>
|
|
</context>
|
|
|
|
<!-- Error -->
|
|
|
|
<context attribute="Error" lineEndContext="#stay" name="Error"/>
|
|
|
|
</contexts>
|
|
<itemDatas>
|
|
<!-- action definition (shell script) -->
|
|
<itemData name="actionAttribute" defStyleNum="dsAttribute"/>
|
|
<!-- rule / action call -->
|
|
<itemData name="Rule" defStyleNum="dsFunction"/>
|
|
<itemData name="Action" defStyleNum="dsNormal"/>
|
|
<!-- variables with attributes -->
|
|
<itemData name="Variable" defStyleNum="dsVariable"/>
|
|
<itemData name="VariableDelimiter" defStyleNum="dsOperator"/>
|
|
<itemData name="VariableAttribute" defStyleNum="dsAttribute"/>
|
|
<itemData name="VarAssign" defStyleNum="dsVariable"/>
|
|
<itemData name="Varname" defStyleNum="dsVariable"/>
|
|
<!-- common -->
|
|
<itemData name="Normal" defStyleNum="dsNormal"/>
|
|
<itemData name="Feature" defStyleNum="dsBuiltIn"/>
|
|
<itemData name="FeatureOperator" defStyleNum="dsOperator" bold="1"/>
|
|
<itemData name="Operator" defStyleNum="dsOperator" bold="1"/>
|
|
<itemData name="Keyword" defStyleNum="dsKeyword"/>
|
|
<itemData name="Comment" defStyleNum="dsComment"/>
|
|
<itemData name="CommentTitle" defStyleNum="dsComment" bold="1"/>
|
|
<itemData name="String" defStyleNum="dsString"/>
|
|
<itemData name="EscapeSeq" defStyleNum="dsSpecialChar"/>
|
|
<itemData name="Error" defStyleNum="dsError"/>
|
|
</itemDatas>
|
|
</highlighting>
|
|
<general>
|
|
<comments>
|
|
<comment name="singleLine" start="#"/>
|
|
</comments>
|
|
<keywords weakDeliminator=":;{}()[].!+,-<=>%&/?^|~\*,"/>
|
|
</general>
|
|
</language>
|
|
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
|