<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="Q" version="1.01" kateversion="2.1" section="Sources" extensions="*.q">
  <highlighting>
    <list name="keywords">
      <item> as </item>
      <item> and </item>
      <item> const </item>
      <item> def </item>
      <item> div </item>
      <item> else </item>
      <item> extern </item>
      <item> from </item>
      <item> if </item>
      <item> import </item>
      <item> in </item>
      <item> include </item>
      <item> mod </item>
      <item> not </item>
      <item> or </item>
      <item> otherwise </item>
      <item> private </item>
      <item> public </item>
      <item> special </item>
      <item> then </item>
      <item> type </item>
      <item> undef </item>
      <item> var </item>
      <item> virtual </item>
      <item> where </item>
    </list>
    <list name="types">
      <item> Bool </item>
      <item> Char </item>
      <item> File </item>
      <item> Float  </item>
      <item> Int </item>
      <item> List </item>
      <item> String </item>
      <item> Tuple </item>
    </list>
    <contexts>
      <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
        <keyword attribute="Keyword" context="#stay" String="keywords"/>
        <keyword attribute="Conid" context="#stay" String="types"/>
        <RegExpr attribute="Normal Text" context="#stay" String="[a-z_][A-Za-z0-9_]*"/>
        <RegExpr attribute="Conid" context="#stay" String="[A-Z][A-Za-z0-9_]*"/>
        <RegExpr attribute="Number" context="#stay" String="0x[A-Za-z0-9]+"/>
        <Float attribute="Number" context="#stay"/>
        <Int attribute="Number" context="#stay"/>
        <DetectChar attribute="String" context="String" char="&quot;"/>
        <Detect2Chars attribute="Comment" context="Comment1" char="/" char1="*" />
        <Detect2Chars attribute="Comment" context="Comment2" char="/" char1="/"/>
      </context>
      <context attribute="String" lineEndContext="#stay" name="String">
        <RegExp attribute="String" context="#stay" String="\\."/>
        <DetectChar attribute="String" context="#pop" char="&quot;"/>
      </context>
      <context attribute="Comment" lineEndContext="#stay" name="Comment1">
        <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/"/>
      </context>
      <context attribute="Comment" lineEndContext="#pop" name="Comment2"/>
    </contexts>
    <itemDatas>
      <itemData name="Normal Text" defStyleNum="dsNormal" />
      <itemData name="Keyword"     defStyleNum="dsKeyword" />
      <itemData name="Conid"       defStyleNum="dsDataType"/>
      <itemData name="Number"      defStyleNum="dsDecVal" />
      <itemData name="String"      defStyleNum="dsString" />
      <itemData name="Comment"     defStyleNum="dsComment" />
    </itemDatas>
  </highlighting>
  <general>
    <keywords casesensitive="1" />
    <comments>
      <comment name="singleLine" start="//" />
      <comment name="multiLine" start="/*" end="*/" />
    </comments>
  </general>
</language>
