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
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language
[
<!ENTITY int "(?:[0-9]++(_++[0-9]++)*+)">
<!ENTITY hex "(?:[0-9a-fA-F]++(_++[0-9a-fA-F]++)*+)">
<!ENTITY exp "(?:[eE][-+]?∫)">
<!ENTITY float "(\b∫(\.((∫&exp;?+|&exp;)[fFdD]?\b|[dDfFgG]\b)?|&exp;[fFdD]?\b|[dDfFgG]\b)|\.∫&exp;?[dDfFgG]?\b)">
<!ENTITY hexfloat "\b0[xX](&hex;\.?+&hex;?+|\.&hex;?)[pP][-+]?∫[dDfFgG]?\b">
]>
<!--
Based on the java syntax file 1.19 by Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)
-->
<language name="Groovy" version="12" kateversion="5.79" section="Sources" extensions="*.groovy;*.gradle;*.gvy;Jenkinsfile" license="LGPL" author="Chris Reeves (chris@ev-soft.net)">
<highlighting>
<list name="java15">
<include>java15##Java</include>
</list>
<list name="keywords">
<item>as</item>
<item>assert</item>
<item>class</item>
<item>default</item>
<item>enum</item>
<item>extends</item>
<item>false</item>
<item>implements</item>
<item>import</item>
<item>in</item>
<item>instanceof</item>
<item>native</item>
<item>abstract</item>
<item>interface</item>
<item>new</item>
<item>null</item>
<item>package</item>
<item>super</item>
<item>this</item>
<item>throws</item>
<item>trait</item>
<item>true</item>
<item>var</item>
</list>
<list name="control flow">
<item>break</item>
<item>case</item>
<item>catch</item>
<item>continue</item>
<item>do</item>
<item>else</item>
<item>finally</item>
<item>for</item>
<item>goto</item>
<item>if</item>
<item>return</item>
<item>switch</item>
<item>throw</item>
<item>try</item>
<item>while</item>
</list>
<list name="types">
<item>def</item>
<item>boolean</item>
<item>byte</item>
<item>char</item>
<item>double</item>
<item>float</item>
<item>int</item>
<item>long</item>
<item>short</item>
<item>void</item>
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
<DetectSpaces context="#stay"/>
<DetectChar attribute="Symbol" context="Dot" char="." lookAhead="1"/>
<DetectChar attribute="Symbol" context="AfterSymbol" char="{" beginRegion="Brace1"/>
<DetectChar attribute="Symbol" context="AfterSymbol" char="}" endRegion="Brace1"/>
<!-- Comment next line if you don't use Javadoc tool -->
<IncludeRules context="##Javadoc"/>
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
<AnyChar attribute="Symbol" context="AfterSymbol" String="()[]&|+,-/*<=>;!%?:~^"/>
<AnyChar context="Number" String="0123456789" lookAhead="1"/>
<DetectChar attribute="String" context="StringSQ" char="'"/>
<DetectChar attribute="String" context="StringDQ" char="""/>
<Detect2Chars attribute="String" context="StringDollarSlashy" char="$" char1="/"/>
<keyword attribute="Keyword" context="#stay" String="keywords"/>
<keyword attribute="Control Flow" context="#stay" String="control flow"/>
<keyword attribute="Data Type" context="#stay" String="types"/>
<keyword attribute="Java15" context="#stay" String="java15"/>
<RegExpr attribute="Function" context="#stay" String="\b[_a-zA-Z]\w*(?=[\s]*(/\*\s*\d+\s*\*/\s*)?[(])" />
<DetectIdentifier attribute="Normal Text"/>
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Dot">
<IncludeRules context="FindFloat"/>
<DetectChar attribute="Symbol" context="#pop!Member" char="." />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Member" fallthroughContext="#pop">
<DetectSpaces attribute="Normal Text" context="#stay"/>
<RegExpr attribute="Function" context="#pop" String="\b[_a-zA-Z]\w*(?=[\s]*(/\*\s*\d+\s*\*/\s*)?[({'"])" />
<Detect2Chars attribute="Comment" context="#pop!Commentar 1" char="/" char1="/"/>
<DetectChar attribute="String" context="#pop!StringSlashy" char="/"/>
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="AfterSymbol" fallthroughContext="#pop">
<DetectSpaces attribute="Normal Text" context="#stay"/>
<Detect2Chars attribute="Comment" context="#pop!Commentar 1" char="/" char1="/"/>
<DetectChar attribute="String" context="#pop!StringSlashy" char="/"/>
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Number">
<IncludeRules context="FindFloat"/>
<RegExpr attribute="Hex" context="#pop" String="\b0[xX]&hex;[lL]?\b"/>
<RegExpr attribute="Binary" context="#pop" String="\b0[bB][01]++(_++[01]++)*+[gGiIlL]?\b"/>
<RegExpr attribute="Octal" context="#pop" String="\b0_*+[0-7]++(_++[0-7_]++)*+[gGiIlL]?\b"/>
<RegExpr attribute="Decimal" context="#pop" String="\b(0|[1-9][0-9]*+(_++[0-9_]++)*+)[gGiIlL]?\b"/>
<AnyChar attribute="Error" context="#pop" String="0123456789"/>
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="FindFloat">
<RegExpr attribute="Float" context="#pop" String="&float;|&hexfloat;"/>
</context>
<context attribute="String" lineEndContext="#pop" name="StringSQ" fallthroughContext="#pop!StringInSQ">
<Detect2Chars attribute="String" context="#pop!String3SQ" char="'" char1="'"/>
<DetectChar attribute="String" context="#pop" char="'"/>
</context>
<context attribute="String" lineEndContext="#pop" name="StringInSQ">
<DetectChar context="StringEscapedChar" char="\" lookAhead="1"/>
<DetectChar attribute="String" context="#pop" char="'"/>
</context>
<context attribute="String" lineEndContext="#pop!StringIn3SQ" name="String3SQ" fallthroughContext="#pop!StringIn3SQ">
<LineContinue attribute="Symbol" context="#pop!StringIn3SQ" char="\"/>
</context>
<context attribute="String" lineEndContext="#stay" name="StringIn3SQ">
<DetectChar context="StringEscapedChar" char="\" lookAhead="1"/>
<StringDetect attribute="String" context="#pop" String="'''"/>
</context>
<context attribute="String" lineEndContext="#pop" name="StringDQ" fallthroughContext="#pop!StringInDQ">
<Detect2Chars attribute="String" context="#pop!String3DQ" char=""" char1="""/>
<DetectChar attribute="String" context="#pop" char="""/>
</context>
<context attribute="String" lineEndContext="#pop" name="StringInDQ">
<DetectChar attribute="String Interpolation" context="Interpolation" char="$"/>
<DetectChar context="StringEscapedChar" char="\" lookAhead="1"/>
<DetectChar attribute="String" context="#pop" char="""/>
</context>
<context attribute="String" lineEndContext="#pop!StringIn3DQ" name="String3DQ" fallthroughContext="#pop!StringIn3DQ">
<LineContinue attribute="Symbol" context="#pop!StringIn3DQ" char="\"/>
</context>
<context attribute="String" lineEndContext="#stay" name="StringIn3DQ">
<DetectChar attribute="String Interpolation" context="Interpolation" char="$"/>
<DetectChar context="StringEscapedChar" char="\" lookAhead="1"/>
<StringDetect attribute="String" context="#pop" String="""""/>
</context>
<context attribute="String" lineEndContext="#stay" name="StringSlashy">
<DetectChar attribute="String Interpolation" context="Interpolation" char="$"/>
<DetectChar context="StringSlashyEscapedChar" char="\" lookAhead="1"/>
<DetectChar attribute="String" context="#pop" char="/"/>
</context>
<context attribute="String" lineEndContext="#pop" name="StringSlashyEscapedChar">
<Detect2Chars attribute="String" context="#pop" char="\" char1="/"/>
<IncludeRules context="StringEscapedChar"/>
</context>
<context attribute="String" lineEndContext="#stay" name="StringDollarSlashy">
<DetectChar context="InterpolationDollarSlashy" char="$" lookAhead="1"/>
<Detect2Chars attribute="String" context="#pop" char="/" char1="$"/>
</context>
<context attribute="String" lineEndContext="#stay" name="InterpolationDollarSlashy">
<Detect2Chars attribute="String Interpolation" context="#pop!InInterpolation" char="$" char1="{"/>
<Detect2Chars attribute="String Char" context="#pop" char="$" char1="$"/>
<Detect2Chars attribute="String Char" context="#pop" char="$" char1="/"/>
<RegExpr attribute="String Interpolation" context="#pop!InterpolationIdent" String="\$[_a-zA-Z]\w*" />
<DetectChar attribute="String" context="#pop" char="$"/>
</context>
<context attribute="String" lineEndContext="#stay" name="Interpolation" fallthroughContext="#pop">
<DetectChar attribute="String Interpolation" context="#pop!InInterpolation" char="{"/>
<DetectIdentifier attribute="String Interpolation" context="#pop!InterpolationIdent"/>
</context>
<context attribute="String Interpolation" lineEndContext="#stay" name="InInterpolation">
<DetectChar attribute="String Interpolation" context="#pop" char="}"/>
<IncludeRules context="Normal"/>
</context>
<context attribute="String Interpolation" lineEndContext="#pop" name="InterpolationIdent" fallthroughContext="#pop">
<DetectChar attribute="Symbol" context="InterpolationMember" char="."/>
</context>
<context attribute="String Interpolation" lineEndContext="#stay" name="InterpolationMember" fallthroughContext="#pop#pop">
<DetectIdentifier attribute="String Interpolation" context="#pop"/>
</context>
<context attribute="String" lineEndContext="#pop" name="StringEscapedChar">
<HlCStringChar attribute="String Char" context="#pop"/>
<RegExpr attribute="String Char" context="#pop" String="\\u[0-9a-fA-F]{4}"/>
<RegExpr attribute="Error" context="#pop" String="\\(u[0-9a-fA-F]*|.)?"/>
</context>
<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
<DetectSpaces />
<IncludeRules context="##Comments"/>
</context>
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
<DetectSpaces />
<IncludeRules context="##Comments"/>
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false"/>
<itemData name="Function" defStyleNum="dsFunction"/>
<itemData name="Data Type" defStyleNum="dsDataType"/>
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="String Char" defStyleNum="dsSpecialChar"/>
<itemData name="String Interpolation" defStyleNum="dsSpecialString"/>
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Symbol" defStyleNum="dsOperator"/>
<itemData name="Java15" defStyleNum="dsBuiltIn" bold="1" italic="0"/>
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="//"/>
<comment name="multiLine" start="/*" end="*/" region="Comment"/>
</comments>
<keywords casesensitive="1"/>
</general>
</language>
<!-- kate: replace-tabs off; -->
|