<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language [
  <!ENTITY sep "&#9;">
]>
<!--
Inspired by Rainbow CSV

Language name     | Separator     | Extension | Properties
 CSV              | , (comma)     |   .csv    | Ignored inside double-quoted fields
 TSV              | \t (TAB)      | .tsv .tab |
 CSV (semicolon)  | ; (semicolon) |           | Ignored inside double-quoted fields
 CSV (whitespace) | whitespace    |           | Consecutive whitespaces are merged
 CSV (pipe)       | | (pipe)      |
-->
<language name="TSV" section="Other" version="1" kateversion="2.4" extensions="*.tsv;*.tab" mimetype="text/csv" priority="5" author="Jonathan Poelen (jonathan.poelen@gmail.com)" license="MIT">
  <highlighting>

    <contexts>
      <context name="Column0" lineEndContext="#stay" attribute="Column 0">
        <DetectChar char="&sep;" context="#pop!Column1" attribute="Column 0 Separator"/>
      </context>

      <context name="Column1" lineEndContext="#pop!Column0" attribute="Column 1">
        <DetectChar char="&sep;" context="#pop!Column2" attribute="Column 1 Separator"/>
      </context>

      <context name="Column2" lineEndContext="#pop!Column0" attribute="Column 2">
        <DetectChar char="&sep;" context="#pop!Column3" attribute="Column 2 Separator"/>
      </context>

      <context name="Column3" lineEndContext="#pop!Column0" attribute="Column 3">
        <DetectChar char="&sep;" context="#pop!Column4" attribute="Column 3 Separator"/>
      </context>

      <context name="Column4" lineEndContext="#pop!Column0" attribute="Column 4">
        <DetectChar char="&sep;" context="#pop!Column5" attribute="Column 4 Separator"/>
      </context>

      <context name="Column5" lineEndContext="#pop!Column0" attribute="Column 5">
        <DetectChar char="&sep;" context="#pop!Column6" attribute="Column 5 Separator"/>
      </context>

      <context name="Column6" lineEndContext="#pop!Column0" attribute="Column 6">
        <DetectChar char="&sep;" context="#pop!Column7" attribute="Column 6 Separator"/>
      </context>

      <context name="Column7" lineEndContext="#pop!Column0" attribute="Column 7">
        <DetectChar char="&sep;" context="#pop!Column8" attribute="Column 7 Separator"/>
      </context>

      <context name="Column8" lineEndContext="#pop!Column0" attribute="Column 8">
        <DetectChar char="&sep;" context="#pop!Column9" attribute="Column 8 Separator"/>
      </context>

      <context name="Column9" lineEndContext="#pop!Column0" attribute="Column 9">
        <DetectChar char="&sep;" context="#pop!Column0" attribute="Column 9 Separator"/>
      </context>
    </contexts>

    <itemDatas>
      <itemData name="Column 0" defStyleNum="dsNormal"/>
      <itemData name="Column 1" defStyleNum="dsVariable"/>
      <itemData name="Column 2" defStyleNum="dsString"/>
      <itemData name="Column 3" defStyleNum="dsBuiltIn"/>
      <itemData name="Column 4" defStyleNum="dsPreprocessor"/>
      <itemData name="Column 5" defStyleNum="dsChar"/>
      <itemData name="Column 6" defStyleNum="dsFunction"/>
      <itemData name="Column 7" defStyleNum="dsBaseN"/>
      <itemData name="Column 8" defStyleNum="dsOperator"/>
      <itemData name="Column 9" defStyleNum="dsDataType"/>

      <itemData name="Column 0 Separator" bold="1" defStyleNum="dsNormal"/>
      <itemData name="Column 1 Separator" bold="1" defStyleNum="dsVariable"/>
      <itemData name="Column 2 Separator" bold="1" defStyleNum="dsString"/>
      <itemData name="Column 3 Separator" bold="1" defStyleNum="dsBuiltIn"/>
      <itemData name="Column 4 Separator" bold="1" defStyleNum="dsPreprocessor"/>
      <itemData name="Column 5 Separator" bold="1" defStyleNum="dsChar"/>
      <itemData name="Column 6 Separator" bold="1" defStyleNum="dsFunction"/>
      <itemData name="Column 7 Separator" bold="1" defStyleNum="dsBaseN"/>
      <itemData name="Column 8 Separator" bold="1" defStyleNum="dsOperator"/>
      <itemData name="Column 9 Separator" bold="1" defStyleNum="dsDataType"/>
    </itemDatas>
  </highlighting>
</language>
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->

