You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
258 lines
12 KiB
258 lines
12 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE language SYSTEM "language.dtd">
|
|
<language name="OpenCL" section="Sources"
|
|
version="1.44" kateversion="2.4"
|
|
indenter="cstyle"
|
|
extensions="*.cl"
|
|
mimetype="text/x-clsrc"
|
|
priority="5">
|
|
<highlighting>
|
|
<list name="keywords">
|
|
<item> __constant </item>
|
|
<item> __global </item>
|
|
<item> __local </item>
|
|
<item> __private </item>
|
|
<item> __kernel </item>
|
|
<item> __read_only </item>
|
|
<item> __write_only </item>
|
|
<item> constant </item>
|
|
<item> global </item>
|
|
<item> local </item>
|
|
<item> private </item>
|
|
<item> kernel </item>
|
|
<item> read_only </item>
|
|
<item> write_only </item>
|
|
<item> break </item>
|
|
<item> case </item>
|
|
<item> continue </item>
|
|
<item> default </item>
|
|
<item> do </item>
|
|
<item> else </item>
|
|
<item> enum </item>
|
|
<item> for </item>
|
|
<item> goto </item>
|
|
<item> if </item>
|
|
<item> inline </item>
|
|
<item> return </item>
|
|
<item> sizeof </item>
|
|
<item> struct </item>
|
|
<item> switch </item>
|
|
<item> typedef </item>
|
|
<item> union </item>
|
|
<item> while </item>
|
|
</list>
|
|
<list name="types">
|
|
<item> bool </item>
|
|
<item> uchar </item>
|
|
<item> uchar2 </item>
|
|
<item> uchar3 </item>
|
|
<item> uchar4 </item>
|
|
<item> uchar8 </item>
|
|
<item> uchar16 </item>
|
|
<item> char </item>
|
|
<item> char2 </item>
|
|
<item> char3 </item>
|
|
<item> char4 </item>
|
|
<item> char8 </item>
|
|
<item> char16 </item>
|
|
<item> const </item>
|
|
<item> double </item>
|
|
<item> double2 </item>
|
|
<item> double3 </item>
|
|
<item> double4 </item>
|
|
<item> double8 </item>
|
|
<item> double16 </item>
|
|
<item> event_t </item>
|
|
<item> float </item>
|
|
<item> float2 </item>
|
|
<item> float3 </item>
|
|
<item> float4 </item>
|
|
<item> float8 </item>
|
|
<item> float16 </item>
|
|
<item> half </item>
|
|
<item> half2 </item>
|
|
<item> half3 </item>
|
|
<item> half4 </item>
|
|
<item> half8 </item>
|
|
<item> half16 </item>
|
|
<item> image1d_t </item>
|
|
<item> image2d_t </item>
|
|
<item> image3d_t </item>
|
|
<item> uint </item>
|
|
<item> uint2 </item>
|
|
<item> uint3 </item>
|
|
<item> uint4 </item>
|
|
<item> uint8 </item>
|
|
<item> uint16 </item>
|
|
<item> int </item>
|
|
<item> int2 </item>
|
|
<item> int3 </item>
|
|
<item> int4 </item>
|
|
<item> int8 </item>
|
|
<item> int16 </item>
|
|
<item> ulong </item>
|
|
<item> ulong2 </item>
|
|
<item> ulong3 </item>
|
|
<item> ulong4 </item>
|
|
<item> ulong8 </item>
|
|
<item> ulong16 </item>
|
|
<item> long </item>
|
|
<item> long2 </item>
|
|
<item> long3 </item>
|
|
<item> long4 </item>
|
|
<item> long8 </item>
|
|
<item> long16 </item>
|
|
<item> restrict </item>
|
|
<item> sampler_t </item>
|
|
<item> ushort </item>
|
|
<item> ushort2 </item>
|
|
<item> ushort3 </item>
|
|
<item> ushort4 </item>
|
|
<item> ushort8 </item>
|
|
<item> ushort16 </item>
|
|
<item> short </item>
|
|
<item> short2 </item>
|
|
<item> short3 </item>
|
|
<item> short4 </item>
|
|
<item> short8 </item>
|
|
<item> short16 </item>
|
|
<item> signed </item>
|
|
<item> static </item>
|
|
<item> unsigned </item>
|
|
<item> void </item>
|
|
<item> volatile </item>
|
|
</list>
|
|
<contexts>
|
|
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
|
|
<DetectSpaces />
|
|
<RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0\s*$" beginRegion="PP" firstNonSpace="true" />
|
|
<DetectChar context="AfterHash" char="#" firstNonSpace="true" lookAhead="true" />
|
|
<StringDetect attribute="Region Marker" context="Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
|
|
<StringDetect attribute="Region Marker" context="Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
|
|
<keyword attribute="Keyword" context="#stay" String="keywords"/>
|
|
<keyword attribute="Data Type" context="#stay" String="types"/>
|
|
<DetectIdentifier />
|
|
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
|
|
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
|
|
<Float attribute="Float" context="#stay">
|
|
<AnyChar String="fF" attribute="Float" context="#stay"/>
|
|
</Float>
|
|
<HlCOct attribute="Octal" context="#stay"/>
|
|
<HlCHex attribute="Hex" context="#stay"/>
|
|
<Int attribute="Decimal" context="#stay" >
|
|
<StringDetect attribute="Decimal" context="#stay" String="ULL" insensitive="true"/>
|
|
<StringDetect attribute="Decimal" context="#stay" String="LUL" insensitive="true"/>
|
|
<StringDetect attribute="Decimal" context="#stay" String="LLU" insensitive="true"/>
|
|
<StringDetect attribute="Decimal" context="#stay" String="UL" insensitive="true"/>
|
|
<StringDetect attribute="Decimal" context="#stay" String="LU" insensitive="true"/>
|
|
<StringDetect attribute="Decimal" context="#stay" String="LL" insensitive="true"/>
|
|
<StringDetect attribute="Decimal" context="#stay" String="U" insensitive="true"/>
|
|
<StringDetect attribute="Decimal" context="#stay" String="L" insensitive="true"/>
|
|
</Int>
|
|
<HlCChar attribute="Char" context="#stay"/>
|
|
<DetectChar attribute="String" context="String" char="""/>
|
|
<IncludeRules context="##Doxygen" />
|
|
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
|
|
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
|
|
<AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;"/>
|
|
</context>
|
|
|
|
<context attribute="String" lineEndContext="#pop" name="String">
|
|
<LineContinue attribute="String" context="#stay"/>
|
|
<HlCStringChar attribute="String Char" context="#stay"/>
|
|
<DetectChar attribute="String" context="#pop" char="""/>
|
|
</context>
|
|
|
|
<context attribute="Region Marker" lineEndContext="#pop" name="Region Marker">
|
|
</context>
|
|
|
|
<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
|
|
<LineContinue attribute="Comment" context="#stay"/>
|
|
<IncludeRules context="##Alerts" />
|
|
</context>
|
|
|
|
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
|
|
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
|
|
<IncludeRules context="##Alerts" />
|
|
</context>
|
|
|
|
<context attribute="Error" lineEndContext="#pop" name="AfterHash">
|
|
<!-- define, elif, else, endif, error, if, ifdef, ifndef, include, include_next, line, pragma, undef, warning -->
|
|
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*if(?:def|ndef)?(?=\s+\S)" insensitive="true" beginRegion="PP" firstNonSpace="true" />
|
|
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*endif" insensitive="true" endRegion="PP" firstNonSpace="true" />
|
|
<RegExpr attribute="Preprocessor" context="Define" String="#\s*define.*((?=\\))" insensitive="true" firstNonSpace="true" />
|
|
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*(?:el(?:se|if)|include(?:_next)?|define|undef|line|error|warning|pragma)" insensitive="true" firstNonSpace="true" />
|
|
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s+[0-9]+" insensitive="true" firstNonSpace="true" />
|
|
</context>
|
|
|
|
<context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">
|
|
<LineContinue attribute="Preprocessor" context="#stay"/>
|
|
<RangeDetect attribute="Prep. Lib" context="#stay" char=""" char1="""/>
|
|
<RangeDetect attribute="Prep. Lib" context="#stay" char="<" char1=">"/>
|
|
<IncludeRules context="##Doxygen" />
|
|
<Detect2Chars attribute="Comment" context="Commentar/Preprocessor" char="/" char1="*" beginRegion="Comment2" />
|
|
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/" />
|
|
</context>
|
|
|
|
<context attribute="Preprocessor" lineEndContext="#pop" name="Define">
|
|
<LineContinue attribute="Preprocessor" context="#stay"/>
|
|
</context>
|
|
|
|
<context attribute="Comment" lineEndContext="#stay" name="Commentar/Preprocessor">
|
|
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment2" />
|
|
</context>
|
|
|
|
<context attribute="Comment" lineEndContext="#stay" name="Outscoped" >
|
|
<DetectSpaces />
|
|
<IncludeRules context="##Alerts" />
|
|
<DetectIdentifier />
|
|
<DetectChar attribute="String" context="String" char="""/>
|
|
<IncludeRules context="##Doxygen" />
|
|
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
|
|
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
|
|
<RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
|
|
<RegExpr attribute="Preprocessor" context="#pop" String="#\s*el(?:se|if)" firstNonSpace="true" />
|
|
<RegExpr attribute="Preprocessor" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
|
|
</context>
|
|
|
|
<context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
|
|
<DetectSpaces />
|
|
<IncludeRules context="##Alerts" />
|
|
<DetectIdentifier />
|
|
<DetectChar attribute="String" context="String" char="""/>
|
|
<IncludeRules context="##Doxygen" />
|
|
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
|
|
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
|
|
<RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
|
|
<RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
|
|
</context>
|
|
</contexts>
|
|
<itemDatas>
|
|
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
|
|
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
|
|
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>
|
|
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
|
|
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
|
|
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
|
|
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
|
|
<itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
|
|
<itemData name="String" defStyleNum="dsString"/>
|
|
<itemData name="String Char" defStyleNum="dsChar"/>
|
|
<itemData name="Comment" defStyleNum="dsComment"/>
|
|
<itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false"/>
|
|
<itemData name="Preprocessor" defStyleNum="dsOthers" spellChecking="false"/>
|
|
<itemData name="Prep. Lib" defStyleNum="dsOthers" spellChecking="false"/> <!--,Qt::darkYellow,Qt::yellow,false,false)); -->
|
|
<itemData name="Alert" defStyleNum="dsAlert" spellChecking="false"/>
|
|
<itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/>
|
|
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
|
|
</itemDatas>
|
|
</highlighting>
|
|
<general>
|
|
<comments>
|
|
<comment name="singleLine" start="//" />
|
|
<comment name="multiLine" start="/*" end="*/" />
|
|
</comments>
|
|
<keywords casesensitive="1" additionalDeliminator="'"" />
|
|
</general>
|
|
</language>
|